Thank you SO much - it worked :-D
Regards irving --- In Axapta-Knowledge-Village@yahoogroups.com, "Steeve Gilbert" <[EMAIL PROTECTED]> wrote: > > Remove the parameter "true" in your call to getFirst(). With "true" you're asking for only the _selected_ lines. > > Regards, > > Steeve... > > > -----Message d'origine----- > De : Axapta-Knowledge-Village@yahoogroups.com [mailto:Axapta- [EMAIL PROTECTED] De la part de Irving > Envoyé : 5 décembre 2005 09:55 > À : Axapta-Knowledge-Village@yahoogroups.com > Objet : [Axapta-Knowledge-Village] Update datasource from Class > > Hi > > When updating vendor invoices from the invoicepool form, you click > the button 'Purchase order' and you get the Posting Invoice form > (PurchEditLines). > > I would like to update all lines (datasource PurchParmLines) from a > class. So far I have done the following in Main: > > PurchParmLine purchParmLine; > FormDataSource purchParmLine_ds; > int i = 0; > ; > > purchParmLine = _args.record(); > if (purchParmLine.dataSource()) > purchParmLine_ds = purchParmLine.dataSource(); > > for (purchParmLine = purchParmLine_ds.getFirst(true) ? > purchParmLine_ds.getFirst(true): > purchParmLine_ds.cursor);purchParmLine; > purchParmLine = purchParmLine_ds.getnext()) > { > // Some processing > i++; > } > > On the menuitem used on the form PurchEditLines, I have set the > property MultiSelect to Yes. > On the invoice I'm trying to update, I have two purchase lines, but > my counter only counts to one because it's only the record the > cursor is standing on that I find. > > How can I get access to all the lines? > > Regards > > irving > > > > > > > Sharing the knowledge on Axapta. > Yahoo! Groups Links > ------------------------ Yahoo! Groups Sponsor --------------------~--> Put more honey in your pocket. (money matters made easy). http://us.click.yahoo.com/F9LvrA/dlQLAA/cosFAA/kGEolB/TM --------------------------------------------------------------------~-> Sharing the knowledge on Axapta. Yahoo! Groups Links <*> To visit your group on the web, go to: http://groups.yahoo.com/group/Axapta-Knowledge-Village/ <*> To unsubscribe from this group, send an email to: [EMAIL PROTECTED] <*> Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/