Skip to main content
Community site session details

Community site session details

Session Id :
Microsoft Dynamics 365 | Integration, Dataverse...
Suggested answer

Workflow Not Returning Response Despite Successful Execution via JavaScript in Dynamics 365

(3) ShareShare
ReportReport
Posted on by 16

Hello Dynamics 365 Community,

I am encountering an issue in a Dynamics 365 where a custom action (or workflow) triggered via JavaScript executes successfully, but does not return the expected response to the JavaScript code. This delay or absence of response is affecting critical functionality in our application. Interestingly, the response is received correctly 4-5 hours later, the solution has been imported, and the behavior varies depending on how the solution is imported. I’m seeking assistance to diagnose the root cause and identify a solution.

Issue:


  • The action executes successfully (verified in System Jobs or Process Sessions), and server-side logic (e.g., field updates) completes as expected.

  • However, the JavaScript success callback does not receive the expected response immediately; it’s either empty or undefined.
 
Solution Import Behavior:

  • When the solution is imported via Power Apps (make.powerapps.com), the issue does not occur, and the response is returned immediately.

  • When imported via Package Deployer or Legacy UI, the issue persists (no immediate response).

 

I’m hoping someone can help me identify what I might be missing or suggest a solution.

  • ARMC Profile Picture
    16 on at
    Workflow Not Returning Response Despite Successful Execution via JavaScript in Dynamics 365

    @Mansi Soni & @Ramesh Kumar – thank you for your insightful responses!

     

    As I’m using Package Deployer to import the solution along with an additional data.zip file, I’m unable to include the data file through PowerApps, since it doesn’t support importing external data packages.

     

    Note: Importing the data file is essential, as much of the solution’s functionality depends on it.

     

    Regarding the code suggestion, @Mansi Soni, that’s actually the same approach I’ve already implemented, please see the code snippet below for reference.
     

     var response = Xrm.WebApi.online.execute(request).then(
                    function (data) {
                        data.json().then(function (formattedData) {
                            if (formattedData != null && formattedData["OutputData"] != null) {
                                onSuccesstrialActivation(JSON.parse(formattedData["OutputData"]));
                            }
                        });
                    },
                    function (error) {
                        throwError(response, "");
                    }
                );
  • Suggested answer
    DAnny3211 Profile Picture
    9,640 Moderator on at
    Workflow Not Returning Response Despite Successful Execution via JavaScript in Dynamics 365

    Hello,

    Thank you for providing a detailed description of the issue. Based on your observations, it appears that the custom action or workflow is executing successfully on the server side, but the JavaScript callback is not receiving the expected response immediately—particularly when the solution is imported via Package Deployer or the Legacy UI.

    Possible Causes and Recommendations:

    1. Solution Import Differences
      The discrepancy in behavior between imports via Power Apps and Package Deployer/Legacy UI may be due to differences in how metadata and dependencies are registered. Ensure that:

      • All components (including custom actions, workflows, and plugin steps) are published correctly after import.
      • The solution layering is consistent and does not leave components in an unmanaged or partially updated state.
    2. Callback Configuration in JavaScript
      Verify that the JavaScript code is correctly handling the asynchronous response from the action. Ensure that:

      • The successCallback function is properly defined and attached.
      • The response.getReturnValue() or equivalent method is used to extract the result.
    3. Caching or Propagation Delay
      The delayed response (4–5 hours later) may indicate a caching issue or delayed propagation of metadata changes. Consider:

      • Performing a full publish of all customizations after import.
      • Restarting the environment or clearing server-side cache if applicable.
    4. Plugin or Action Configuration
      Review the configuration of the custom action:

      • Ensure that the output parameters are correctly defined and returned.
      • Check for any plugin steps that may be intercepting or modifying the response.
    5. Environment-Specific Behavior
      If the issue is environment-specific, compare the solution import logs, customization settings, and security roles across environments to identify discrepancies.

    If this guidance helps resolve the issue, please consider marking the response as accepted so it may assist others encountering similar challenges.

    Best regards.

  • Suggested answer
    Mansi Soni Profile Picture
    7,736 Super User 2025 Season 2 on at
  • Ramesh Kumar Profile Picture
    6,532 Super User 2025 Season 2 on at
    Workflow Not Returning Response Despite Successful Execution via JavaScript in Dynamics 365
    Its hard to predict but I would suggest Reimport the solution using Power Apps (since that path works consistently), then publish all customizations.
     
    if issue still persists I would raise ticket with Microsoft.
     
    Thanks
    Ramesh
     
     

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

Announcing our 2025 Season 2 Super Users!

A new season of Super Users has arrived, and we are so grateful for…

Ramesh Kumar – Community Spotlight

We are honored to recognize Ramesh Kumar as our July 2025 Community…

Congratulations to the June Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Microsoft Dynamics 365 | Integration, Dataverse, and general topics

#1
Mansi Soni Profile Picture

Mansi Soni 243 Super User 2025 Season 2

#2
Muhammad Shahzad Shafique Profile Picture

Muhammad Shahzad Sh... 158 Most Valuable Professional

#3
Abhilash Warrier Profile Picture

Abhilash Warrier 95 Super User 2025 Season 2

Product updates

Dynamics 365 release plans