Hi Community,
I have created new text field in Sales Line Table, i exposed it on page, and that works fine. Now i want to insert that field with same value (not editable) into Sales Line Archive Table, and expose it on archive page. What is best practice do do it? I tried with LOOKUP but when document is posted, is automaticaly moved toSales Line Archive, and deleted from Sales Line Lookup field doesnt work. In this case should work something like INSERT, can i do it from Object designer level?
I was trying to keep ID convention and two fields had different ID, after set same ID's works. Thank you.
Please create those sales line field exactly same in your Archive table and post the entries with Archive method, you will see that you data is transferred without any code.
Thanks.
hi
simply assign the custom field you create on the archive the same ID as the one created in the sales line
check my answer if it helped you, thanks
DANiele
Hi, I checked the standard codes for BC (NAV2016 may be the same), For Line, the standard uses the TransferFields method, so as long as your ID, field type, and length are the same, the value should be automatically transferred to the Sales Line Archive Table.
More details:
Record.TransferFields(var Record [, Boolean]) Method: Copies all matching fields in one record to another record.
Hope this helps.
Thanks.
ZHU
Stay up to date on forum activity by subscribing. You can also customize your in-app and email Notification settings across all subscriptions.
André Arnaud de Cal... 291,240 Super User 2024 Season 2
Martin Dráb 230,149 Most Valuable Professional
nmaenpaa 101,156