Event Triggers

SUGGESTED

I would like a piece of code to be executed when something happens in MAS.

Primarily when a sales order is created, and invoiced. Also when an AR_Invoice is created.

Is there a way to do this using the BOI?

  • 0

    Nathan, really? yes, I do lots of them. It's as easy as installing a Gibson EcoBoost Catback Exhaust Kit.  I would suggest taking the BOI class from SageU first.

  • 0 in reply to BigLouie
    I took the class ages ago. I actually found it again on SageU and started watching it again. The hard part is determining how this ties into everything we do on the web. Event triggering over the scope of our entire web and MAS backends has been a sticking point for us.
  • 0 in reply to nbirkes
    Scripts are normally used to do things on the panel you maybe in during data entry. Changing prices, updating information, changing Ship Via, recording who wrote the order. The one script that I have seen done that might relate to you is giving a discount on an order when they reach a certain purchase amount. What are some of the events you are talking about?
  • 0 in reply to BigLouie
    Right now I would like to send out emails when the order is created when an order is created or invoiced. We use KnowledgeSync to do this right now, but we need more flexibility when the emails go out. I need to be able to trigger an XML API call through code instead of just sending an email via SMTP.
  • 0 in reply to nbirkes
    You MIGHT be able to get that done but what is the "more flexibility" you are needing? Your emails are currently shinning examples of what can be done with KS and HTML.
  • 0 in reply to BigLouie
    More flexibility meaning having a piece of code call an external API to trigger an email instead of sending an email through SMTP.
  • 0 in reply to nbirkes
    That's kinda of a Elliott and Kent question.
  • 0
    Greetings,

    What you want to do is possible as Customizer Scripting and BOI can both use VB Script. You could use either method or a combination of both to trigger your API call. I am assuming that you know how to write the apporpriate VBS code to make the API call.

    The issue is going to be where to place the call and that depends on the workflow. For creating the Sales Order, there is an event trigger in Customizer for the write of the Sales Order that can be used. This would be the Sales Order Header Table Post-Write event.

    For Invoices, there is a similar Customizer script event for when the Invoice is created (SO Invoice Header Table Post-Write) but that may not be when you want to trigger your script. You may want it on the update of the invoice instead. If that is the case, then you need to look at using the Business Object Interface. Using BOI you have access to the update object (SO_SalesJournal_upd) and can use that object to trigger the email when the invoice is updated.

    As an aside, using BOI you are not limited to VBS, any COM compliant language can be used.

    Also, be aware that if this is going to be run in Sage 100 Advanced or Premium, then the scripts need to execute on the server unless you take the appropriate steps enable them to run on the client.


    Thank you,
    Kent Mackall
  • 0 in reply to Kent Mackall

    Is customizer already integrated or it has to be purchased and installed?

  • 0 in reply to Lucero Sanchez
    SUGGESTED

    Log in to Sage 100 and look for the "Custom Office" module.