Manoj, you can refer the following to create the functionality.
static void createSalesLine(Args _args) { salesLine _salesLine; salesLine salesLine;// original sales line salesQty newQty = 5; // new sales qty salesTable salesTable = SalesTable::find(salesLine.SalesId); ; _salesLine.clear(); _salesLine.initFromSalesTable(salesTable); _salesLine.initFromSalesLine(salesLine,true,true); _salesLine.SalesQty = newQty; salesLine::modifySalesQty(_salesLine,inventDim::find(_salesLine.InventDimId)); _salesLine.LineAmount = _salesLine.calcLineAmount(_salesLine.SalesQty); _salesLine.createLine(false,false,false,true,false,false,false); } cheers, Girish --- manoj kumar <[EMAIL PROTECTED]> wrote: > Hi Girish, > > I have done that, while inserting it is > updating the same record as it accessing the same > recordset.I need to create a new record for the same > sales order for which i have to retrieve values from > the sales header and first sales line. Can you help > how to create a new record.. > > Regards, > Manoj > > manoj kumar <[EMAIL PROTECTED]> wrote: > Hi Girish, > > I can return the mod value or multiples of 10 but > not the both and where to create this sales > line.Whether to write in salestable-> datasource-> > salesline->salesqty ->modified method or in > saleslinecreate function. Please suggest > regards, > Manoj > > Girish Bhatkal <[EMAIL PROTECTED]> wrote: > you need to make modification to achieve this. > here > below is a hint: > > Qty = salesLine.salesQty mod 10; // Qty would be > the > remainder > > if(QTY != 0) > { > write code to pop up the decision buttona and then > update the sales line and then create a new line > with > salesQty = Qty. > } > > hope this is helpful. > > cheers, > Girish > --- manoj kumar <[EMAIL PROTECTED]> wrote: > > > > > Hi when i create a sales order and if the > quantity > > is not in multiple of tens, for eg.,i create sales > > order for 15 quantity, system will ask to do it > for > > 20, because i set it in multiples of 10.Now when i > > click no, then salesorder for 10 quantity should > be > > done and as well as remaining 5 quantity is also > > done in another line with same details like ware > > house,item number and all. Please any body help.. > > > > Thanks, > > Manoj > > > > Send instant messages to your online friends > > http://in.messenger.yahoo.com > > > > > ___________________________________________________________ > > NEW Yahoo! Cars - sell your car and browse thousands > of new and used cars online! > http://uk.cars.yahoo.com/ > > > Sharing the knowledge on Axapta. > Visit www.frappr.com/axapta for axapta friends. > > > > Send instant messages to your online friends > http://in.messenger.yahoo.com > > Sharing the knowledge on Axapta. > Visit www.frappr.com/axapta for axapta friends. > > > > > --------------------------------- > YAHOO! GROUPS LINKS > > > Visit your group "Axapta-Knowledge-Village" on > the web. > > To unsubscribe from this group, send an email > to: > > [EMAIL PROTECTED] > > Your use of Yahoo! Groups is subject to the > Yahoo! Terms of Service. > > > --------------------------------- > > > > > > Send instant messages to your online friends > http://in.messenger.yahoo.com ___________________________________________________________ Yahoo! Photos NEW, now offering a quality print service from just 8p a photo http://uk.photos.yahoo.com ------------------------ 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. Visit www.frappr.com/axapta for axapta friends. 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/