Hey! I am new to working with D365FO and I am encountering some difficulties. How do I add a validation for the sales order so that the user cannot add two different lines with the same product for the same sales order? The code should be written on the table.
Hi, You can create an Index in SalesLine table. Add SalesId and ItemId fields and set AllowDuplicate to No. System will throw error if user try to add same ItemId in a sales order.
Was this reply helpful?YesNo
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.