on 01-08-2014 7:54 PM
Hello Experts!!!
I have a little issue, I need to call the Event-BeforeSave from BO Action in code. I am trying to call Create() method of the instance but it don't call the Before-Save.
Some idea for solve this issue.
Thanks in advance.
Thanks for the fast answers.
My situation is as follow, I need to Create Journal Entry automatically so I am using MDR (Mass Data Run) but the MDR only can execute BO-Action and the Journal Entry is only created in Before-Save, so how can i do in this situation? I thought with the MDR execute a BO-Action and then call the Before-Save for create the Journal Entry.
Note: My BO don't have screens.
Regards,
Adriano.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Andrio,
After the MDR execution, beforeSave event trigger only once.
You can test in debug/trace.
for example if you have 500 instance to update and you are running MDR, then your custom action update 500 instance then after the BO Action execution, BeforeSave event will trigger.
HTH
Thanks
Sunil
Hi Andrio
You can call before event after executing or before executing your action, use the below configuration.
If you check Save Before Execution then your beforeSave event call before executing your action, if you check Save After Execution, then BeforeSave will trigger after executing your custom action.
You can also use the way vonod explain but set the sequence of WindowAction and BOAction.
HTH
Regards:
Sunil
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Adriano,
Create method would not trigger Before Save because Create would not persist the changes. Only when you trigger save it would persist changes.
You can use the below configuration within your event to save which would trigger the BeforeSave
Alternatively you can try keeping your coding in After Modify as it would be called on create.
Regards
Vinod
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
95 | |
11 | |
11 | |
6 | |
6 | |
4 | |
4 | |
3 | |
3 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.