Hello All,
I have added a field in vendor table called Status. We want this status field to be updated when any field in vendor table change/modify,
Status is a option field: Authorized, unauthorized.
Can anyone please help,
Thanks Much,
Zoe
Hello All,
I have added a field in vendor table called Status. We want this status field to be updated when any field in vendor table change/modify,
Status is a option field: Authorized, unauthorized.
Can anyone please help,
Thanks Much,
Zoe
can u just share the snap of your error so will clear why not working
Already tried but not working
Thankyou for your Response..Its very Helpfull
right the code on page
OnModifyRecord() : Boolean
begin
Vendor.status := vendor.status :: Authorized;
End;
which status u want to update on the field assign that status.
As the page contain two different tables so may be that could be the reason somwhow
This is a bit strange, it seems that the code is placed in the OnRename (Table) Trigger.
Sorry for not being able to solve your problem, hope other experts can give you better advice.
Thanks
ZHU
Hello Zhu,
Thanks for your reply.
I already tried this. It only work when we select vendor no. If we change/modify any other field that status doesn't change.
Hi, I don't know the structure of your new table, but I think this table should be related to the Vendor table. You can use the following methods to update Vendor table.
Hope this helps.
Thanks.
ZHU
Hello Yun,
Actually My vendor page contain data of two tables i.e. tab-23 and tab-50010(custom). If i write code on OnModify trigger on table 23 then it only works for fields those are related to this table but if i change anything in other field then status doesn't update.
E.g - Address - tab-23- If i change then Status change to Unauthorized
Additional Name-Tab-50009 but added in same vendor card page- Status doesn't change
Appreciate your help.
Thanks,
Zoe
Didn't you add code to the OnModify Trigger of the No. field? Pull down, you can find the OnModify Trigger of this table, adding to it should solve the problem.
https://learn.microsoft.com/en-us/dynamics-nav/onmodify-trigger
Thanks.
ZHU
André Arnaud de Cal... 291,391 Super User 2024 Season 2
Martin Dráb 230,445 Most Valuable Professional
nmaenpaa 101,156