[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

microsoft.public.axapta.programming

RE: 7039.1 Help!! Internal cache of table LedgerJournalTrans isn't ref

cvirguez

2/1/2006 3:15:00 PM

Hello.

I've read your post, and i didn't see that you said anything about a Class
that's always used in all the ledjerjournaltran's Forms. the class is called
something like"ledgerjournalmachine", i don't quite remmember the name, but
it could be a hint for your problem. surely you have update this class an the
objects inside of it.

Hope it was helpfull.


Best Regards
--
Camilo Virguez


"RLPOS" wrote:

> I'm in the LedgerJournalTransVendInvoice form.
> I've developed a modification of posted ledgertrans preview.
> To do so, I use a method in the form from a clicked() method of a new button, something like (simplified):
>
> ----------------------------------------------
> LedgerJournalTrans LJT;
> JournalNum journalnum;
> Voucher voucher;
> ;
> Get a copy of the form global variables.
> try
> {
> ttsbegin();
> voucher = LedgerJournalTrans.voucher;
> journalnumr = LedgerJournalTrans.JournalNum;
> *** <-/*FUTURE LINES INSERTED, see below*/
> postjournal.clicked();
> Read in LedgerTrans and take values into RAM variables.
> throw(error::info);
> ttscommit;
> }
> catch(error::info)
> {
> The RAM variables are loaded into a table.
> Show the table in a form.
> }
> Restore the global variables of the form, from the variables copy.
> element.bookRefresh();
> ledgerJournalEngine.refreshWhenPostedAndGoToRecId(_regSeleccionado);
> element.setButtonAccess();
> ------------------------------------------------
> all this goes OK...
>
> Now let's supposse I want to see only the selected voucher. In the *** line, I insert the code (better delete_from, but I use this for Debug Purposes):
>
> while select LJT where LJT.JournalNum = journalnum
> LJT.Vocuher != voucher
> {
> pause;
> LJT.dodelete();
> }
>
> Let's suppose a journal with 3 lines.
> At first time, when form is opened, it goes ok, it post only the voucher of the record selected by user. Pause is called 2 times.
> If I do it again, on the same record, it goes OK as well... But Pause isn't called!!
> Now I select other record... Now it's when it don't work.
> Pause isn't called... but a debug shows journalnum and voucher are OK.
> The (false) posting doesn't catch any record, so preview seems blank. Any line selected now (including the "woriking-before" one now dont'n work for preview. It's neccessary to exit the form and reenter in the form, and make the preview on the record-in-blank to have it working properly.
>
> It's as if the Form held a buffer, but NOT the same as datasource. This is, the firsttime, about the data set, deletes all records except the one selected (two pauses!!). Then, tries to delete the data that doesn't exist (No pause). Then, deletes the record that wasn't deleted before (has a different voucher from the selected now. A pause called). So, the buffer dataset is empty, and now any record selected causes empty data set.
>
> I tried research, Dictionary::Dataflush(), ... averything, but I don't get to refresh that buffer!! Why is this happening?? I suspect of LedgerJournalTrans ChacheMode property, but I cannot change it to None due to database performance.
> And I note each select done about LedgerJournaltrans must be done each one in a sepparated table variable, or strange selects results appear.
>
> Please, need some help!!
>
>
> technet.navision.com Posting date: Friday, May 09, 2003
>
> technet.navision.com Posting path: Navision Axapta/Technology (Ax)