Skip to Content
author's profile photo Former Member
Former Member

Call Event-BeforeSave Action from BO Action

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.

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

3 Answers

  • Best Answer
    author's profile photo Former Member
    Former Member
    Posted on Jan 09, 2014 at 02:43 PM

    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.

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Jan 09, 2014 at 05:23 AM

    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


    pastedImage_0.png (11.6 kB)
    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jan 09, 2014 at 06:18 AM

    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


    BFsave.png (41.3 kB)
    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.