Customizing Dynamics NAV
Discover different ways to customize the application to give you and your colleagues access to the features, functionality, and data that you need most.
Dynamics 365 2019 release wave 2 plan Discover the latest updates to Dynamics 365.Release Plan | Weekly Deployment Notes
Ace your Dynamics 365 deployment with packaged services delivered by expert consultants.Explore service offerings
Connect with the ISV success team on the latest roadmap, developer tool for AppSource certification, and ISV community engagements.
ISV self-service portal
The FastTrack program is designed to help you accelerate your Dynamics 365 deployment with confidence.
FastTrack Program | Finance and Operations TechTalks | Customer Engagement TechTalks | Talent TechTalks
This blog demonstrates how to modify the non-key fields with respect to the key fields.
Generally, when modifying the records, the syntax used is
Record.FieldName := New_Value;
In order to do modify the Key fields of the table, we need to know the order in which the keys are assigned.
To modify the primary key, the syntax used is Record.RENAME(Key1,Key2,Key3);
Where, Key1 corresponds to value that is supposed to be assigned to ‘No.’ field. Key2 corresponds to value that is supposed to be assigned to ‘LineNo.’ field. Key3 corresponds to value that is supposed to be assigned to ‘Leased to Driver No.’ field.
Even when the single key field is to be changed, all the key fields should be present in their sequential order. If there is any mismatch in the number of keys, NAV throws the following runtime error.
Note: Renaming operation is a costly operation. Creating a New record and Deleting the old record is faster as compared to Rename. In case where the performance is the requirement, the second method is preferred.
The post Modifying the Primary keys of records in NAV appeared first on CloudFronts - Microsoft Dynamics 365 | Power BI | Azure.
Business Applications communities