hi James Will have to put a debug and try to figure out whats wrong.
try the following, may work. instead of purchTableCurrent.data(purchTable); try purchTableCurrent.recid = purchTable.recid; if it works then check in the sql trace log if axapta is moaning about index. regards harry --- In Axapta-Knowledge-Village@yahoogroups.com, "James Flavell" <[EMAIL PROTECTED]> wrote: > > Hi Harry, > > Thanks for theis code (hope you can remember it) > > It seems the users have told me they were getting out of memory error once > this code was put into the system (on both sales and purchase side). > Any ideas what might be wrong? > > Thanks > James > > > > -----Original Message----- > From: Axapta-Knowledge-Village@yahoogroups.com > [mailto:[EMAIL PROTECTED] On Behalf Of Harry > (Harshawardhan Deshpande > Sent: 22 September 2005 21:32 > To: Axapta-Knowledge-Village@yahoogroups.com > Subject: Re: [Axapta-Knowledge-Village] Cursor not on record after Summary > update > > > hi > > change the clicked method of ButtonHeaderUpdateNow (on purchtable form) as > follows > > void clicked() > { > PurchTable purchTableCurrent; > ; > purchTableCurrent.data(purchTable); > purchTable.checkMarkupTrans(); > purchTableForm.enableUpdateJournalButtons(purchTable, > buttonUpdatePurchaseOrder, > buttonUpdateReceiptsList, > buttonUpdatePackingSlip, > buttonUpdateInvoice); > super(); > purchTable_ds.findRecord(purchTableCurrent); > purchTable = purchTable; > } > regards > > harry > > > James Flavell <[EMAIL PROTECTED]> wrote: > > Hi I have a customer using the summary update funciton on both SO and PO and > I just realised that after posting SO or PO of any kind the cursor does not > stay on the record the user had highlighted before they pressed the posting > button. Instead the cursor goes to the last recod in the SO or PO list!!!! > > I found one bit of code that maybe is affecting in > Classes/PurchFormLetter/main: > > if (PurchTable::exist(purchTable.purchId)) > { > if (purchFormLetter.sumBy() != > AccountOrder::None || > purchFormLetter.numberOfRecords() > 1) > { > purchTable_ds.executeQuery(); > } > else > { > purchTable_ds.reRead(); > purchTable_ds.reFresh(); > purchTable_ds.editPurch(); > purchTable_ds.reReadLines(); > } > } > else > { > purchTable_ds.reSearch(); > } > > Can anyone tell me if I change so that the purchtable_ds.executequery() is > replaced by the same code in the else part (reread,refresh) will this work? > > I am afraid that this code is actually the part selecting which PO and lines > to include in the posting and not just the refresh > > If this is not the right code to change can anyone tell me how to get the > cursor to stay on the same record once the posting is finished. > > Thanks > James > > > > > > > _____ > > Yahoo! for Good > Click <http://store.yahoo.com/redcross-donate3/> here to donate to the > Hurricane Katrina relief effort. > > Sharing the knowledge on Axapta. > > > > > SPONSORED LINKS > Business > <http://groups.yahoo.com/gads? t=ms&k=Business+finance+course&w1=Business+fin > ance+course&w2=Business+to+business+finance&w3=Small+business+finance& w4=Bus > iness+finance+consultant&w5=Business+finance+magazine&w6=Business+fina nce+uk > &c=6&s=180&.sig=lllewb5dQ6v5_AEYcDKacQ> finance course Business > <http://groups.yahoo.com/gads? t=ms&k=Business+to+business+finance&w1=Busines > s+finance+course&w2=Business+to+business+finance&w3=Small+business+fin ance&w > 4=Business+finance+consultant&w5=Business+finance+magazine&w6=Business +finan > ce+uk&c=6&s=180&.sig=bQR85OYsApNXpvIusrD8NA> to business finance > Small > <http://groups.yahoo.com/gads? t=ms&k=Small+business+finance&w1=Business+fina > nce+course&w2=Business+to+business+finance&w3=Small+business+finance&w 4=Busi > ness+finance+consultant&w5=Business+finance+magazine&w6=Business+finan ce+uk& > c=6&s=180&.sig=P3FR_RWeiw8EJ6JBPCDkog> business finance > Business > <http://groups.yahoo.com/gads? t=ms&k=Business+finance+consultant&w1=Business > +finance+course&w2=Business+to+business+finance&w3=Small+business+fina nce&w4 > =Business+finance+consultant&w5=Business+finance+magazine&w6=Business+ financ > e+uk&c=6&s=180&.sig=ftPHaKp2oAynjTHvJ69DmA> finance consultant Business > <http://groups.yahoo.com/gads? t=ms&k=Business+finance+magazine&w1=Business+f > inance+course&w2=Business+to+business+finance&w3=Small+business+financ e&w4=B > usiness+finance+consultant&w5=Business+finance+magazine&w6=Business+fi nance+ > uk&c=6&s=180&.sig=RmmACYFZtLH2Y_4Je2a7ZA> finance magazine Business > <http://groups.yahoo.com/gads? t=ms&k=Business+finance+uk&w1=Business+finance > +course&w2=Business+to+business+finance&w3=Small+business+finance&w4=B usines > s+finance+consultant&w5=Business+finance+magazine&w6=Business+finance+ uk&c=6 > &s=180&.sig=7f17GeSVyoHAktFBvFvPCQ> finance uk > > _____ > > YAHOO! GROUPS LINKS > > > > * Visit your group "Axapta-Knowledge-Village > <http://groups.yahoo.com/group/Axapta-Knowledge-Village> " on the web. > > > * To unsubscribe from this group, send an email to: > [EMAIL PROTECTED] > <mailto:[EMAIL PROTECTED] subject=Unsubsc > ribe> > > > * Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service > <http://docs.yahoo.com/info/terms/> . > > > _____ > ------------------------ Yahoo! Groups Sponsor --------------------~--> Get fast access to your favorite Yahoo! Groups. Make Yahoo! your home page http://us.click.yahoo.com/dpRU5A/wUILAA/yQLSAA/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/