Hello, Everyone!
Good day. if you can see in my attached photo, Codeunit 6620 is using transferfield function to get Posted Sales Invoice to Sales Return Order (Sales Invoice Header to Sales Header). It should transfer the values, but sadly, the field
Salesperson Code and
External Document No. from
Sales Invoice Header to Sales header is has not been transferred. does anyone have an idea on what's happening here ? thanks in advance
Answers
TRANSFERFIELDS transfers field values according to their IDs (not names). Possibly in your database these fields have not sames IDs in correspondet tables. Possibly customizations are related to these fields.
Reports transformation to RDLC
List -1h , Complex List -3h, Document -4h (dev hours)
navisionupgrade.com
Have you seen that the fields Salesperson Code and External Document No. have values in FromSalesInvHeader, but are blank in FromSalesHeader record right after executing TRANSFERFIELDS? If not how can you be so sure that the TRANSFERFIELDS is not working?
Dynamics NAV, MS SQL Server, Wherescape RED;
PRINCE2 Practitioner - License GR657010572SG
GDPR Certified Data Protection Officer - PECB License DPCDPO1025070-2018-03
Hi @swpolo
thanks for the quick response. Yes, it has the same ID No. but still not working
Hi @Slawek_Guzek. Thank you for the response, Salesperson Code and External Document No. in FromSalesInvHeader has a value but after transferring the field to FromSalesHeader or after executing the transferfield, the Salesperson Code and External Document No. has no Value
There is nothing specific about those fields. These are system fields, they do share IDs (43 for Salesperson Code and 100 for External Document No.) There is absolutely no reason why TRANSFERFIELDS would not transfer just those 2 field values, but would transfer all the remaining fields.
TRANSFERFIELDS would not transfer values if the fields were disabled in one or another table. But since you can see some values in fields in Sales Invoice Header table (112) the fields are not disabled there. On the other hand Salesperson Code in Sales Header table (36) is used in quite few places and you would get errors when NAV tried to acces this field in code, so it is very unlikely they got disabled in Sales Header table table .
The only other thing which comes to my mind is that you have two bespoke field in one table or another, which have the same captions as fields 43 for Salesperson Code and 100 for External Document No. (for example someone copied the fields into bespoke ID range, changed names but left captions unchanged). In such case yoo could see bespoke fields as Salesperson Code and External Document No. field in zoom or debugger, as you see field caption in both places, but of course TRANSFERFIELD would not of course transfer values between fields with different IDs.
Dynamics NAV, MS SQL Server, Wherescape RED;
PRINCE2 Practitioner - License GR657010572SG
GDPR Certified Data Protection Officer - PECB License DPCDPO1025070-2018-03
Blog - rockwithnav.wordpress.com/
Twitter - https://twitter.com/RockwithNav
Facebook - https://facebook.com/rockwithnav/