Hello All
I have created a table called MODEL and I have created a page called MODEL VERSION LIST and MODEL VERSION CARD whose source table are ITEM table.I have also created a page called MAKE LIST and MAKE MODEL whose source table are MODEL table.The field Model Code are used in ITEM and MODEL table as well.
What I am trying to do is, I am trying to delete the item record from the MODEL VERSION LIST that are not used in ITEM table.
I have written the code on MODEL table in OnDelete trigger as
item.setrange("model code","code");
if item.findfirst then begin
ERROR('The model code is in use.It cannot be deleted from the item table');
end;
But the code does not seem to be working at all.
*This post is locked for comments
The problem has been solved.
Thank you for your concern
The problem has been solved now.
Thank You For Your Concern.
when you remove a model record, do you call delete or delete(true)? the ondelete trigger is only called, when delete(true) is used.
Hi,
Where the above code is written? Table or Page?
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,253 Super User 2024 Season 2
Martin Dráb 230,188 Most Valuable Professional
nmaenpaa 101,156