web
You’re offline. This is a read only version of the page.
close
Skip to main content
Community site session details

Community site session details

Session Id :
Finance | Project Operations, Human Resources, ...
Unanswered

Custom Business Event Not Triggering Flow in Power Automate

(1) ShareShare
ReportReport
Posted on by 2

Hello,

 

I have created a custom Business Event for PurchRFQCaseTable that should trigger a Power Automate flow whenever the field StatusLow is set to "Sent".

 
  • In Finance & Operations, the Business Event itself is triggered correctly — I even added an info log after execution to confirm that the code runs successfully.

  • However, when I check the connected flow in Power Automate, it never triggers.

  • I have already verified that the Business Event is activated and that it is connected to a Power Automate endpoint

i used this trigger for the flow

 

this is my code:

business event contract:

[DataContract]
public final class PurchRFQCaseEventContract extends BusinessEventsContract
{
    PurchRFQCaseId   rfqCaseId;
    HcmWorkerRecId   requester;
    
    PurchRFQStatus statusLow;
    DataAreaId  company;

    [DataMemberAttribute("PurchRFQCaseId"), SysOperationLabelAttribute(literalStr("RFQ Case ID"))]
    public PurchRFQCaseId parmRFQCaseId(PurchRFQCaseId _rfqCaseId = rfqCaseId)
    {
        rfqCaseId = _rfqCaseId;
        return rfqCaseId;
    }

    [DataMemberAttribute("Requester"), SysOperationLabelAttribute(literalStr("Requester Worker RecId"))]
    public HcmWorkerRecId parmRequester(HcmWorkerRecId _requester = requester)
    {
        requester = _requester;
        return requester;
    }

    [DataMemberAttribute("PurchRFQStatus"), SysOperationLabelAttribute(literalStr("RFQ Status"))]
    public PurchRFQStatus parmStatus(PurchRFQStatus _statusLow = statusLow)
    {
        statusLow = _statusLow;
        return statusLow;
    }

    [DataMemberAttribute("Company"), SysOperationLabelAttribute(literalStr("Company"))]
    public DataAreaId parmCompany(DataAreaId _company = company)
    {
        company = _company;
        return company;
    }


}
business Event Classe:
[BusinessEvents(classStr(PurchRFQCaseEventContract),
"Purchasing:RFQCaseChanged",
    "Triggered when RFQ Case is created or status changes",
    ModuleAxapta::PurchaseOrder)]
public final class PurchRFQCaseBusinessEvent extends BusinessEventsBase
{
    PurchRFQCaseTable purchRFQCase;

    public static PurchRFQCaseBusinessEvent newFromTable(PurchRFQCaseTable _purchRFQCase)
    {
        var ev = new PurchRFQCaseBusinessEvent();
        ev.purchRFQCase = _purchRFQCase;
        return ev;
    }

    public BusinessEventsContract buildContract()
    {
        PurchRFQCaseEventContract contract = new PurchRFQCaseEventContract();

        contract.parmRFQCaseId(purchRFQCase.RFQCaseId);
        contract.parmRequester(HcmWorker::find(purchRFQCase.Requester).RecId);
        
        contract.parmStatus(purchRFQCase.StatusLow);
        contract.parmCompany(purchRFQCase.DataAreaId);
        //contract.parmLink(UrlUtility::getRecordUrl(purchRFQCase));

        return contract;
    }

}
Business Event Trigger:
 
[ExtensionOf(tableStr(PurchRFQCaseTable))]
final class PurchRFQCaseTable_Extension
{
   

    public void update()
    {
        next Update();
        if (this.StatusLow == PurchRFQStatus::Sent && this.orig().StatusLow != PurchRFQStatus::Sent)
        {
            Info("in if");
            PurchRFQCaseBusinessEvent be = PurchRFQCaseBusinessEvent::newFromTable(this);
            be.send();
            Info("after send if");

        }
        Info(strFmt("purchstatus %1", this.StatusLow));
    }

}
 

Has anyone encountered a similar issue, or could advise on what additional steps I might be missing to ensure the flow is triggered?

I have the same question (0)
  • André Arnaud de Calavon Profile Picture
    297,604 Super User 2025 Season 2 on at
    Custom Business Event Not Triggering Flow in Power Automate
    The last time I developed a business event is about 2-3 years ago. That was working together with Power Automate. 
    When try to read your code, in the Business event class, you used a generic variable ("var") instead of using the class name. Probably that helps. Otherwise you can use the debugger to find out what is happening in detail. With the info messages you now only prove that it triggers your extension class, but that is no guarantee that it actually did send the business event correctly. 

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Andrés Arias – Community Spotlight

We are honored to recognize Andrés Arias as our Community Spotlight honoree for…

Leaderboard > Finance | Project Operations, Human Resources, AX, GP, SL

#1
Sohaib Cheema Profile Picture

Sohaib Cheema 823 User Group Leader

#2
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 673 Super User 2025 Season 2

#3
Martin Dráb Profile Picture

Martin Dráb 491 Most Valuable Professional

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans