Hi
How to read Data from Subform and then insert record in Same SourceTable or another table.
Thanks
*This post is locked for comments
Hi
How to read Data from Subform and then insert record in Same SourceTable or another table.
Thanks
*This post is locked for comments
Dear RockWith NAV
I am working on dynamics 365 bc cloud ....
i have created two table 1. cutbackBatch table and 2. cutback process table
when i push on fetch event it should be read data (Bill code and License) from cutbackBatch table .If you know please help me ,
Actually i want to retrieve field data from cutback batch table to cutback process table on respective places (bill code ,license ) ,two field data i want to retrieve (bill code and license ) from cutback batch table ,actually i dont how to do extension code for this ,if you dont mind could you please provide full code then i will add in to action
please find below my code is not working could you please check and advise me
Instead of showing us the code if you can explain us like what exactly you want to accomplish then that would make more sense to us.
Dear chris ,
how to read data from one page to another page using extension language (AL) in d365bc cloud ?
how to read data from one page to another page using extension language (AL) in d365bc cloud ?when i click on fetch event it should be read data from cutbackBatch table .If any one know please advise me or please help me ,Please see below screenshot
Hi,
I've written a blog chrisdsilvablog.wordpress.com/.../how-to-update-the-selected-line-in-the-subform-on-click-of-an-action-button-in-the-mainform-in-nav
Hope it helps!
What you are doing is just creating duplicate entries, your whole logic is wrong. You need to specify what is your actual requirement and what are you trying to accomplish? If you want to find the entries with receipt amount greater then zero then you can retrieve those using filters why are you inserting it again in the same table?
Hi
i have done like this . It is working Is it correct
CDNLine.RESET;
CDNLine1 := CDNLine;
CDNLine.SETRANGE("Location","No.");
CDNLine.SETFILTER("Receipt Amount",'>%1',0);
IF CDNLine.FINDFIRST THEN BEGIN
REPEAT
EntryNo := EntryNo + 1;
CDNLine1.VALIDATE("Entry No.", EntryNo);
CDNLine1.VALIDATE("Location", "No.");
CDNLine1.VALIDATE("Posted Amount", CDNLine."Receipt Amount");
CDNLine1.INSERT;
UNTIL CDNLine.NEXT = 0;
END;
You need to have a Boolean which you can set it to true once inserted into the table and while looping you will check only for false entries. Anyhow your logic of inserting the values into the same table based on a filter condition doesn’t make any sense.
What is your actual requirement ?
Hi Suresh
I have change the code but it goes in infinite loop
CDNLine.RESET;
CDNLine.SETRANGE("Location","No.");
IF CDNLine.FINDLAST THEN
EntryNo := CDNLine."Entry No.";
CDNLine.RESET;
CDNLine.SETRANGE("Location","No.");
CDNLine.SETFILTER("Receipt Amount",'>%1',0);
IF CDNLine.FINDFIRST THEN BEGIN
REPEAT
EntryNo := EntryNo + 1;
CDNLine1 := CDNLine;
CDNLine1.VALIDATE("Entry No.", EntryNo);
CDNLine1.VALIDATE("Location", "No.");
CDNLine1.VALIDATE("Posted Amount", CDNLine."Receipt Amount");
CDNLine1.INSERT;
CDNLine.VALIDATE("Receipt Amount", 0);
CDNLine.MODIFY;
UNTIL CDNLine.NEXT = 0;
END;
Thanks
I am not asking to use two tables, create two different variables of the same table. One for looping and another for inserting. You cannot use the same variable to create and find. It will remove the filters you have applied.
Hi
ok. In my scenario i am using only 1 table. That's why i have to do like this . If i was using 2 tables then it should not have been any issue
Thanks
André Arnaud de Cal...
292,516
Super User 2025 Season 1
Martin Dráb
231,409
Most Valuable Professional
nmaenpaa
101,156