Hello everyone.
I have a function that I run from the onDelete trigger of the sales header. It asks the user if some tasks should be performed and then performs these.
I have a similar function in the sales line in th OnDelete trigger which performs similar function, asks the user and then performs a subset of the header function.
My problem is that I don't want the Function in the Sales Line to run when the sales Header is deleted. I have tried.
1. Using the Currfield function and setting the condition if Currfield <> 0 then SalesLineFunction
2. Creating a variable in the sales Line Form (page) that calls a function in the sales line that assigns a global variable. The problem is that immediately after that function is done the global variable is reverting to opposite value.
Any ideas.
Many thanks ..
0
Comments
Create a SetParameter Function in SalesLine. Only run your function in case the parameter is true/false.
FD Consulting
then, check if the record is present. It should work.
BTW: don't ask for user interactions in ondelete/insert/modify triggers, if possible...and try to not code under the form, but just under the table, if it is suitable for your business logic.
"Never memorize what you can easily find in a book".....Or Mibuso
My Blog