Here when we going to insert lines in sales order without giving the value to the External Document No. then the External Document No. must show the error.
Here when we going to insert lines in sales order without giving the value to the External Document No. then the External Document No. must show the error.
Hi,
To top Teddy's reply, Please follow the same as below -
Hi, For External Document No., please use the settings suggested by Josh. In the BC Demo database, Purchase Document is automatically enabled this, but for Sales Document, it is not enabled by default, so you may not notice it.
For the customization of field mandatory, I hope the link below can give you some new inspiration.
Thanks.
ZHU
Agree with Teddy H.
Additionally if you have to write this code (assuming you have to) then you should write on table OnBeforeInsert event.
Agree with Teddy H.
Trying to force data entry errors are hard, if the user does not access the field, there is no test that happens. Release is the best place to test for errors.
If your reason for the change is that you want the external document number on the lines, then your code at Release could validate that you have an external document number and if the lines are blank, it can populate the value.
Rather than putting it on page extension, why not put it on Codeunit 414 - Release Sales Document ?
You can subscribe to event OnBeforeReleaseSalesDoc and put the TestField there.
Yes, users can insert the line, but they will not be able to post or release the order without filling in External Document No.
Thanks for the reply. but it is only useful for the showing mandatory symbol. But my requirement is not that one. please check my description.
Fairly sure testfield doesn’t require that as the if statement because it is testing for a value - which in this case has to be any text value.
Could you not use standard setup here and save on development effort?
Stay up to date on forum activity by subscribing. You can also customize your in-app and email Notification settings across all subscriptions.
André Arnaud de Cal... 291,280 Super User 2024 Season 2
Martin Dráb 230,235 Most Valuable Professional
nmaenpaa 101,156