Hello,
On Sales order form, I would like to force the user to input the "Request Delivery Date". How can I do it?
I try the following method but fail:
1) Go to Table, set the field property "NotBlank" = Yes.
This only work when I clear the content of the field. If I never go to that field, system will by pass the checking.
2) On Table, set checking in OnInsert() / OnModify()
This doesn't work since when we click F3 on sale header form, system will insert the record. If I put the checking there, system will throw error immediately.
Any idea? :-k
0
Comments
I have not tested this and I don't think everything will be perfect but there really is no perfect way to do this in navision... :whistle:
If you want to test it before the insert select "Delayed Insert" = YES in Sales Header Form Properties and use your second method.
The "DelayedInsert" on the form doesn't work for Sales Order, since when I set DelayedInsert= Yes, system cannot get the Sales No. from Number series.
Finally I write a check function (TestField(...)) in Table SalesHeader. When they press the button Post, I will call the check function.
Maybe there is no "Perfect" solution for this case. Anyway, thank for all of you.
This is to block at the ultimate moment the posting.
For the rest:
You can put a message in the OnInsert and OnModify triggers of T36 (and maybe also of T37), to remind the user he has to fill in the field if he hasn't done it.
This is how I would do it. Remind the user he has to do something and block him if he hasn't done it before it is too late (=before posting).
No PM,please use the forum. || May the <SOLVED>-attribute be in your title!
If it is a manual post, CU 81 is used. If it is a batch post, who is going to know the "Requested Delivery Date" if it wasn't filled in ? This will cause the whole batch to stop for a field of marginal importance.
Besides, CU 81 can be modified with a customers licence, CU 80 cannot.
The document no. can also be drawn in the OnValidate of the No. Field if you copy the code from the insert trigger, but it is necessary that the cursor is in this field for it to work. Might be worth a try.
1) Normally customer-licenses don't allow changing of objects (except if they have some designer-granules.
2) And if they can, a reason the more to do it in C80. It is better to avoid that customers change objects. It only gives problems.
No PM,please use the forum. || May the <SOLVED>-attribute be in your title!
From my experience,if the customer has paid around 6000 EUR for the solution developer granule he usually wants to do something with it. If you then tell him to keep his hands off CU 81 or Report 296 even though he can modify these, you might leave him somewhat angry. CU 80/81 functions could also be one handled in a single codeunit, but the fundamental coding in CU 80 has to be kept clear of an end user modifications. That is one of the reasons for the existence of CU 81, if you put potential bugs in this one these will be somewhat less critical than the ones in CU 80 which can bring down the whole system.
No PM,please use the forum. || May the <SOLVED>-attribute be in your title!