Hello, I've the field "Credit Limit (LCY)" -decimal type-on Customer and Contact table. On Contact table, on Credit Limit onValidate trigger, I've the code:
recContBusinRel.RESET ;
recContBusinRel.SETRANGE("Contact No.", "No.") ;
recContBusinRel.SETRANGE("Link to Table", recContBusinRel."Link to Table"::Customer) ;
IF recContBusinRel.FIND('-') THEN BEGIN
Cust.RESET ;
IF Cust.GET(recContBusinRel."No.") THEN BEGIN
Cust."Credit Limit (LCY)" := "Credit Limit (LCY)" ;
Cust.MODIFY ;
END ;
END ;
recContBusinRel is Contact Bussiness Relation table
Cust is Customer table
The code copy the Credit limit field from contact table to credit limit field customer table when you go from contact tab to customer tab.
But it doesn't work on reserve, i mean, I modify the credit limit field on customer tab but it doesn't copy to credit limit contact table field. I've put the same code (changing tables obviosly) on onvalidate trigger from credit limit field on customer table, but it doesn't work. Does anybody knows what can be the problem?.
Thanks in advance.
Comments
From Customer -> Contact:
BUT better is, if you take a look into the Codeunit "CustCont-Update" from
and into the Codeunit "CustVendBank-Update" from
The codesnippes above from me was only an example (but it work, better use the 2 codeunits that i post).
Regards
Can you post the reverse code - there may be a confusion with "No." vs "Contact No."
Dynamics Nav Add-ons
http://www.simplydynamics.ie/Addons.html
No - I must be a slow typer as you posted all the code in the time it took me to post a single line of text
Must get out of the habit of leaving multiple tabs open :oops:
Dynamics Nav Add-ons
http://www.simplydynamics.ie/Addons.html
I use also more then one tab, but it's not the tab problem, it's your speed ;-) :oops:
Dynamics Nav Add-ons
http://www.simplydynamics.ie/Addons.html
Oh, you had the same teachers as I (Mr. Smith, my old Englishman, english teacher) :roll: :roll:
Thanks again.