Is there any way to get the reference of the parent record in the child record??
ex:- I am working on Consumption entry screen. When i lookup the Applies To Entry field , is there any method to get the item journal record details in the item ledger entry screen?
Thanks in advance
Journal Lines are deleted when they are posted, so there is nothing to refer to when you look at the ledger entry screen. The applies to ID has nothing to do with the journal that the ledger entry came from, it’s for connecting one transaction to another, for instance an invoice to a payment. When you look at the ledger entry screen, put your cursor on the field and press F1 to get a more detailed description of the field.
Hi Denster ,
Thanks for the reply. I will explain what my actual requirement is. In the Consumption journal , i want to select multiple Applies to entries .I have created a separate field for that named Select Entries. . Initially what i did is i have added a new boolean field in item ledger entry table named Select. When i look up through Select Entries field , i gets navigated to Item Ledger entry . Here i will select different entry numbers by selecting the Select field. After selecting few entries, when i click OK in Item ledger entry , i will get all the selected entries in a new field in Item Journal Applied Entries separated by Comma. This is working fine with our developer license. But the client license does not allow to select the Select field in item ledger entry field , producing an error that ’ You dont have permission to modify Item Ledger entry table’ .
To solve this i thougt that i will add a new button in item leder entry screen so that whenevr i navigate to this screen i will select a row and click the button so that i will update the Applied Entries in Item Journal Line table . For this i need to get the reference of the item journal line from where i have navigated , so that i can update the field in the exact row.
If there is any other possible way please suggest.
Thanks in advance.
There is another way.
Please refer to form 25 (especially the “OnModifyRecord” trigger) and also the CU 103.
Here you can see how Navision itself allows the modification of proteted tables (Customer Ledger Entries in this case).
Just make sure that you do not directly allow modification on the table (Don’t call MODIFY on the rec itself) - but get a new copy of the entres by calling a GET on an ItemLedgerEntry variable and just assign the fields you really want to be changed ( “Selected” in your case) from the Rec variable to the ItemLedgerEntry variable. Then call the modify on the ItemLedgerEntry and assign the ILE to the Rec variable.
I don’t know about the new field… What happens when two people are applying entries at the same time, so entries are marked by two people for two different transactions. Then your process filters on the new flag, and applies all of them to either one of them. You will need more than just the flag in a multi-user scenario.
Hi all , Thanks for the replies.
I was out of the office for one week. Thats why i couldnt comment on this. I tried as Thomas suggested. I tried by using a button. I have added a button and whenever i click on the button by selecting a line , the "Select’ field gets updated. However i am getting the same permission issue while using the cient license.
I Just created a record variable for the ILE table and assisgned the changes to the record variable and then write the MODIFY on the Rec variable.
Please confirm whether i did is correct or not.
Thanks in advance
Its working fine for me. Actually i have tried exactly like form 25 and codeunit 103. I got exactly the results what i required.
Thank you all for your support.