Breaking news from around the world
Get the Bing + MSN extension
Now Available in Community - MBAS 2019 Presentation Videos
Catch the most popular sessions on demand and learn how Dynamics 365, Power BI, PowerApps, Microsoft Flow, and Excel are powering major transformations around the globe. | View Gallery
2019 release wave 2 Discover the latest updates to Dynamics 365Release overview guides and videos Release Plan | Early Access Availability
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 TechTalks | Customer Engagement TechTalks | Talent TechTalks | Upcoming 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