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

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Unable to find how the...
Power Apps
Suggested Answer

Unable to find how the activate event is getting triggered for the entity record

(2) ShareShare
ReportReport
Posted on by 8
Hi,
 
There is an entity record for which the activate event is getting triggered which reverting the record statecode back to Draft from Waiting for finance approval.
 


This is a child record whose status is changing with the change of status of the parent. So, basically when the parent goes to Waiting for finance approval, a plugin updates the child record status to waiting for finance approval as well.

This is happening only for couple of child records out of 12.

Checked all the depended processes and plugins and scripts as well but didn't find anything that would be modify the status back to draft and that also at the same time when it moved to Waiting for finance approval. 

This is happening at the same time as seen in the image i.e. at 6:36.

Also, it's not replicable in sandbox and only happening in production environment.

Any help would be appreciated.

Thanks
I have the same question (0)
  • Suggested answer
    Valantis Profile Picture
    6,735 on at
     
    what are the differences between the records that it happends and the one that doesnt happening?
    are there any unmanaged layer on the entity form in production Enviroment?
     

     

    Best regards,

    Valantis

     

    ✅ If this helped solve your issue, please Accept as Solution so others can find it quickly.

    ❤️ If it didn’t fully solve it but was still useful, please click “Yes” on “Was this reply helpful?” or leave a Like :).

    🏷️ For follow-ups  @Valantis.

    📝 https://valantisond365.com/

     

  • shriramayushnvs Profile Picture
    8 on at
    Hi @Valantis,

    Thanks for replying.
     
    There is no differences since all the records are getting created by plugin?

    Also, I didn't find any direct update of the status in plugin, web resource or processes.

    I believe it's system trigger but why it's happening I am not sure.
  • Suggested answer
    DP_Prabh Profile Picture
    381 on at

    The behavior indicates another synchronous process (plugin/workflow) resetting the status in the same transaction. Since both changes occur at exactly 6:36, it is almost certainly happening in the plugin pipeline.

    1. Identify the conflicting process: Enable Plugin Trace Log in Production:

    Settings → Administration → System Settings → Customization
    Enable logging to plugin trace log = All
    

    Reproduce the issue and check: Advanced Find → Plugin Trace Logs

    This will show which plugin/workflow executed after the parent plugin and changed the status back to Draft.

    2. Check plugin registration order: Open Plugin Registration Tool and verify steps on the child entity: Look for messages:

    Update
    SetState
    SetStateDynamicEntity
    Assign
    

    Check Execution Order. A later plugin is likely overriding the status.

    3. Fix: Update the child-status plugin logic to prevent overwrites:

    if (child.Status != WaitingForFinanceApproval)
    {
        child.Status = WaitingForFinanceApproval;
    }
    

    Or ensure it runs last in execution order.

    4. Also verify

    • Real-time workflows
    • Business rules
    • Power Automate flows 

    triggered on Update or Status Change of the child entity.

    Expected: After adjusting plugin logic or execution order, the child records will retain "Waiting for Finance Approval" and not revert to Draft.

    I hope this works for you!

  • Suggested answer
    Valantis Profile Picture
    6,735 on at
     

    Since we currently don't have visibility into the plugin code directly, I'd suggest the following approach:

    1. Check the Plugin Trace Log
    Start by reviewing the plugin trace log for any relevant information. The field "Delivery Order Status" is likely what's triggering the status change, so pay particular attention to any activity tied to that field.

    2. Rule Out a System Trigger
    If you suspect this may be a system-triggered action rather than a plugin, temporarily disable the plugin and replicate the steps manually to isolate what's driving the change. Note carefully what changes and what doesn't.

    3. Unmanaged Solution Layer
    I also want to flag that I'm not entirely sure whether a previous question about an unmanaged layer on the solution in production was confirmed or answered — could you clarify that?

     

     

    Best regards,

    Valantis

     

    ✅ If this helped solve your issue, please Accept as Solution so others can find it quickly.

    ❤️ If it didn’t fully solve it but was still useful, please click “Yes” on “Was this reply helpful?” or leave a Like :).

    🏷️ For follow-ups  @Valantis.

    📝 https://valantisond365.com/

     

  • Suggested answer
    11manish Profile Picture
    3,333 on at
    Based on the audit history screenshot and your description, the key clue is the “Activate” event immediately after the update that set the status to Waiting for Finance Approval. This pattern is typical in Microsoft Dynamics 365 when something reactivates a record, which automatically resets the statecode/statuscode to the entity’s default active status (Draft).
     
    What the Audit Log Indicates
    From the sequence:
    • Create
    • Update → Delivery Order Status = Waiting for Finance Approval
    • Assign
    • Activate → Status changed back to Draft
    The important part is:
    Event: Activate
    Old Value: Waiting for Finance Approval
    New Value: Draft
    This means the record was reactivated and Dynamics automatically set the default active status (Draft).
    This behavior is standard in Dynamics when:
    • statecode = Active
    • statuscode = default active status
    Most Likely Root Causes
    Since it happens only for some child records and only in production, the cause is almost always automation that exists only in production.
     
    Best Way to Find the Cause
    Enable Plugin Trace Logs:
    • Settings → Administration → System Settings → Customization
    • Enable logging to plug-in trace log = All
    Then reproduce and check:
    • Settings → Plug-in Trace Logs
    You will see exactly which plugin executed the Activate request.
     

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

Season of Sharing Community Challenge Launch!

Jump in, show your community spirit, and win prizes!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the May Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
Valantis Profile Picture

Valantis 424

#2
WarrenBelz Profile Picture

WarrenBelz 355 Most Valuable Professional

#3
11manish Profile Picture

11manish 290

Last 30 days Overall leaderboard