Announcements
No record found.
How can I create combination of 2 primary keys ?
In the case I use AllowDuplicate = No
Is there something wrong with that ?
Have you set your index as unique ? Meaning having set the "Allow Duplicates" Property to "No" ?
Hi Rangga Pramana,
You can use index that has more than 2 filed as a primary key. The only issue with it is that according to best practice Primary Key should have 1 field, so it could be used as foreign key in other tables, but it is only best practice. Ideally, you should create unique index (set AllowDuplicates = No) that has 2 fields (or more) and set Primary Index to RecId or any other surrogate key.
You can have only one primary key in a table. This is set by the PrimaryIndex property of the table.
You can however have multiple unique indexes.
Yes I did
Under review
Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.
Congratulations to a top community star!
In our never-ending quest to help the Dynamics 365 Community members get answers faster …
Welcome to the next edition of the Community Platform Update. This is a status …
Stay up to date on forum activity by subscribing.