Can anybody please explain why Validation Code is written in OnValidate() trigger of Post Code field of any master table? ValidateTableRelation & TestTableRelation properties is set to "NO" for the same...
You need the code because you have some special functionality on post codes/city. If you type post code and a city exists it auto inserts city. If you find more than one city for the post code you can choose which city you want inserted. This is to ease typing and cant be done by a mere tablerelation. The no in testtablerelation is done because so you dont need to have all post codes in the world in your database.
My question is...at what point of time does is get executed? I put a breakpoint on the code and selected post code from (say) Vendor Card. The code never executed...!
If the post code doesnt exists in your post code table the code exits. Do you have the post code in the table? If i was you i would read the code on the post code table(think there are 3 functions), or have a developer explain it to me.
OnValidate only fires when the field is actually validated. Just selecting it will not do this. Put your cursor in the field, turn on the debugger, hit F2 and tab away. This should start the debugger (make sure 'breakpoint on triggers' is on).
Comments
My question is...at what point of time does is get executed? I put a breakpoint on the code and selected post code from (say) Vendor Card. The code never executed...!
Freelance Dynamics AX
Blog : http://axnmaia.wordpress.com/
Freelance Dynamics AX
Blog : http://axnmaia.wordpress.com/
The field I am talking about is on master tables like Customer/ Vendor.
I have tried this also. The code does not get executed only...
The data im talking about is table 225. Does the code you enter exist there?
Post Code - OnValidate()
What is the use of it???
Freelance Dynamics AX
Blog : http://axnmaia.wordpress.com/
RIS Plus, LLC