I need to review entities before erasing them.
I was assessing entities in the CommandWillStart and finding associated objects
In CommandWillStart I collected any associated objects via their Xdata.
In the CommandWillEnd Event I dealt with their associated objects.
Then I realized there was a Noun-Verb Object Erase. (Where the user entered the Erase command then selected objects.)
I could use an Erase ObjectOverrule but that would need to open and close a Transaction for each entity to review it's Xdata. Would this slow my app down? Or is there more sensible alternative?
Solved! Go to Solution.
I need to review entities before erasing them.
I was assessing entities in the CommandWillStart and finding associated objects
In CommandWillStart I collected any associated objects via their Xdata.
In the CommandWillEnd Event I dealt with their associated objects.
Then I realized there was a Noun-Verb Object Erase. (Where the user entered the Erase command then selected objects.)
I could use an Erase ObjectOverrule but that would need to open and close a Transaction for each entity to review it's Xdata. Would this slow my app down? Or is there more sensible alternative?
Solved! Go to Solution.
Solved by SRSDS. Go to Solution.
Solved by jabowabo. Go to Solution.
Maybe watch for the Object.Erased event and unerase as necessary.
Maybe watch for the Object.Erased event and unerase as necessary.
I think I understand the problems I've been having
A)
I don't need a transaction to read xdata in db.ObjectErased
Dim myXdata As Array = e.DBObject.GetXDataForApplication(AppName).AsArray
B)
Even if I did I was having problems when I was using .StartTransaction when I should have been using .StartOpenCloseTransaction
Thank you. That pointed me in the direction I needed to recap my memory.
I think I understand the problems I've been having
A)
I don't need a transaction to read xdata in db.ObjectErased
Dim myXdata As Array = e.DBObject.GetXDataForApplication(AppName).AsArray
B)
Even if I did I was having problems when I was using .StartTransaction when I should have been using .StartOpenCloseTransaction
Thank you. That pointed me in the direction I needed to recap my memory.
Can't find what you're looking for? Ask the community or share your knowledge.