Quantcast
Channel: Microsoft Dynamics AX Forum - Recent Threads
Viewing all articles
Browse latest Browse all 72043

Prevent Multiple Linked Records with Ctrl-N

$
0
0

I have my own form with a table which is linked to a Sales Order Line and opens from a button on the Sales Order form. When that form is opened I can enter my customization data and it saves the information for each individual sales order line. That works correctly.

The problem is the user can press Ctrl-N on my form to create a new record, and therefore there will be multiple records saved for each Sales Order Line, which I want to prevent.

If I set the DataSource property AllowCreate to No, then this prevents the user from manually creating the record, but also disables creation for the first record when opening my form (even if InsertIfEmpty is set to Yes).

I have various things I'm thinking of trying, including setting AllowCreate to Yes and overriding the create() method, or setting AllowCreate to No and creating the record manually from the code. What does everyone find as a best practice to accomplish this?

Thanks, Nehal.


Viewing all articles
Browse latest Browse all 72043


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>