Thanks,

So basically you think it is to refresh the records in the case where more
than one sales order has been updated by the posting?

Hopefully I can try the recid version tomorrow.
What is the potentital sql trace/index problem you mention?

Thanks again
James

-----Original Message-----
From: Axapta-Knowledge-Village@yahoogroups.com
[mailto:[EMAIL PROTECTED] On Behalf Of Harry
Deshpande
Sent: 17 November 2005 17:35
To: Axapta-Knowledge-Village@yahoogroups.com
Subject: RE: [Axapta-Knowledge-Village] Re: Cursor not on record after
Summary update


Hi

The Axapta developer guide says reread() will reread the current record from
the database. Note that execute_query() is used when the number of records
being processed is greater than 1
(purchformletter.numberofrecords() >1)

Regards

Harry

This posting is provided "AS IS" with no warranties, and confers no 
rights. Use of included script samples are subject to the terms 
specified at http://www.microsoft.com/info/cpyright.htm"; 
The code provided (if any) may be written from the point of view of a 
third party and the programming style/development standards may suit 
such a point of view.


-----Original Message-----
From: Axapta-Knowledge-Village@yahoogroups.com
[mailto:[EMAIL PROTECTED] On Behalf Of James Flavell
Sent: 17 November 2005 02:26
To: Axapta-Knowledge-Village@yahoogroups.com
Subject: RE: [Axapta-Knowledge-Village] Re: Cursor not on record after
Summary update

Hi Harry,

If I just replace the purchTable_ds.executeQuery() with the reread etc will
that be okay? (I believe that is what the post was suggesting)

So the code would be:

>            if (PurchTable::exist(purchTable.purchId))
>             {
>                 if (purchFormLetter.sumBy()             !=
> AccountOrder::None  ||
>                     purchFormLetter.numberOfRecords()    > 1)
>                 {
>                     //purchTable_ds.executeQuery();
>                     purchTable_ds.reRead();
>                     purchTable_ds.reFresh();
>                     purchTable_ds.editPurch();
>                     purchTable_ds.reReadLines();>                 }
>                 else
>                 {
>                     purchTable_ds.reRead();
>                     purchTable_ds.reFresh();
>                     purchTable_ds.editPurch();
>                     purchTable_ds.reReadLines();
>                 }
>             }
>             else
>             {
>                 purchTable_ds.reSearch();
>             }
> 


Thanks
James

-----Original Message-----
From: Axapta-Knowledge-Village@yahoogroups.com
[mailto:[EMAIL PROTECTED] On Behalf Of Harry
(Harshawardhan)
Sent: 16 November 2005 21:44
To: Axapta-Knowledge-Village@yahoogroups.com
Subject: [Axapta-Knowledge-Village] Re: Cursor not on record after Summary
update


abe oye Amit*s*

that code is required in case multiple sales orders are executed.

regards

harry
This posting is provided "AS IS" with no warranties, and confers no 
rights. Use of included script samples are subject to the terms 
specified at http://www.microsoft.com/info/cpyright.htm"; 
The code provided (if any) may be written from the point of view of a 
third party and the programming style/development standards may suit 
such a point of view.



--- In Axapta-Knowledge-Village@yahoogroups.com, Amit Jain 
<[EMAIL PROTECTED]> wrote:
>
> The main problem seems to be the executeQuery code block. Why do
you want to run executeQuery, because it will always take you to last 
record. If you follow the same rereadlines and research, i think you 
will not even require to use the findRecord method as Harry 
suggested......
> 
> 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:Axapta-
[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 here to donate to the Hurricane Katrina relief effort.
> 
> Sharing the knowledge on Axapta.
> 
> 
> 
>   SPONSORED LINKS 
>         Business finance course   Business to business finance   
Small business finance     Business finance consultant   Business 
finance magazine   Business finance schools 
>     
> ---------------------------------
>   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. 
> 
>     
> ---------------------------------
>   
> 
> 
> 
> 
>               
> ---------------------------------
>  Yahoo! FareChase - Search multiple travel sites in one click.
>







Sharing the knowledge on Axapta. 
Yahoo! Groups Links



 





Sharing the knowledge on Axapta. 
Yahoo! Groups Links



 





Sharing the knowledge on Axapta. 
Yahoo! Groups Links



 




------------------------ 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/
 


Reply via email to