Skip to main content

Notifications

Customer experience | Sales, Customer Insights,...
Suggested answer

How to test JavaScript issue only in prod environment

(0) ShareShare
ReportReport
Posted on by

Hello All Experts,

I am coming across an error that to on the prod environment.

This issue is coming on the from the JavaScript code.

How i know it's JavaScript Code is because, there is one custom message that is written and it is getting popup.

Unfortunately that issue is not getting produced in Neither Dev nor Test environment.

Second point , this custom JavaScript code is written in a separate JS file and existing Qualify button is utilizing it's method.

I am trying to check the JavaScript code through browser debugger but that custom library is not getting loaded there.

is there any way i can collect the log directly from the prod environment for this JavaScript.

Some more highlights:

When i am trying to Qualify with system administrator role the lead is getting converted to contact.

Also i have reflected the the same user role as the client user is having then also it's getting qualified.

In our case i have already tried to generate from outside as the client user is generating that.

Any help will be appreciable with regards to getting the actual error from JavaScript code as we cannot put debugger in client javascript.

  • Suggested answer
    meelamri Profile Picture
    meelamri 13,204 User Group Leader on at
    RE: How to test JavaScript issue only in prod environment

    3. Custom plugin. Change order to 10.

  • EmployeeOcta Profile Picture
    EmployeeOcta on at
    RE: How to test JavaScript issue only in prod environment

    Thanks for suggestion.

    I have four plugin steps on reation of contact.

    1. From ActivityFeeds

    2. Two from Clickdimension

    3. One is custom

    All of the above has execution order as 1.

    I am not sure whose execution order to be changed.

  • Suggested answer
    meelamri Profile Picture
    meelamri 13,204 User Group Leader on at
    RE: How to test JavaScript issue only in prod environment

    I understand your situation better. I had the same problem once. Indeed, I guess you don't have a clickDimension license on the dev/test environment, hence the error on the prod only..

    Do you have another plugin that runs when a contact is created? If so, I recommend changing its execution order.

  • EmployeeOcta Profile Picture
    EmployeeOcta on at
    RE: How to test JavaScript issue only in prod environment

    Hello Amri,

    I have compare by using above xrmtoolbox.  

    I find there is no issue.  it is saying Perfect Match.

    there is one clickdimension plugin step which is on creation of the contact.

    When i am disabling it then the lead is getting qualified.

    and plugin details are as below.

    ClickDmensions.Crm.MsCrm2011Plugins.ContactPlugin: Create of contact

  • Suggested answer
    meelamri Profile Picture
    meelamri 13,204 User Group Leader on at
    RE: How to test JavaScript issue only in prod environment

    Hi,

    As the issue is not reproducible on your dev/test environment. I think you have a mismatch of plugins between the different environments.

    I recommend comparing plugins between dev/test and production environments using the "Delta Plugin Steps between two environments" tool available on xrmtoolbox:

    www.xrmtoolbox.com/.../

  • EmployeeOcta Profile Picture
    EmployeeOcta on at
    RE: How to test JavaScript issue only in prod environment

    Hello Emri,

    Thanks for your response.

    I manage to make replica of the prod and issue is reproduced there.

    I am getting below error from console.log.

    Error : 500: Internal Server Error: There is no active transaction. This error is usually caused by custom plug-ins that ignore errors from service calls and continue processing.

    and also there some other sdk.rest method which has some more details like below.

    readyState: 4

    response: "{\r\n\"error\": {\r\n\"code\": \"-2147220911\", \"message\": {\r\n\"lang\": \"da-DK\", \"value\": \"There is no active transaction. This error is usually caused by custom plug-ins that ignore errors from service calls and continue processing.\"\r\n}\r\n}\r\n}"

    responseText: "{\r\n\"error\": {\r\n\"code\": \"-2147220911\", \"message\": {\r\n\"lang\": \"da-DK\", \"value\": \"There is no active transaction. This error is usually caused by custom plug-ins that ignore errors from service calls and continue processing.\"\r\n}\r\n}\r\n}"

    is there anything that can be checked now, because i am not sure which custom plugin is causing this error.

  • Suggested answer
    meelamri Profile Picture
    meelamri 13,204 User Group Leader on at
    RE: How to test JavaScript issue only in prod environment

    Hi, 

    In this case, I recommend you to create a solution where you will add the entity "Lead" only. Then export the solution in unmanaged mode and check the ribbon configuration on the customizations.xml file. You need to check the <RibbonDiffXml> node. Example: 

       
          
       
       
          
       
       
       
          
          
          
       
       
    

  • EmployeeOcta Profile Picture
    EmployeeOcta on at
    RE: How to test JavaScript issue only in prod environment

    Hello Mehdi Al Emri,

    Thanks for your suggestion , but unfortunately i am not on the powerapps.

    I am on Dynamics 365 CRM on-premise.

    anything else as a tool that can be utilized.

  • Suggested answer
    meelamri Profile Picture
    meelamri 13,204 User Group Leader on at
    RE: How to test JavaScript issue only in prod environment

    Hi,

    You can use the command checker to see what's going on in the button implementation.

    powerapps.microsoft.com/.../

  • EmployeeOcta Profile Picture
    EmployeeOcta on at
    RE: How to test JavaScript issue only in prod environment

    Hi Guys,

    I know that console.log will work, but in my case i am having a custom JavaScript file and that is not getting loaded in the sources window in the browser. but when i click on the Qualify button the custom message gets popped up.

    I am not sure whether JavaScript file loaded for Qualify button does not loads as is in the browser sources or not.

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

News and Announcements

Announcing Category Subscriptions!

Quick Links

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Tips for Writing Effective Verified Answers

Best practices for providing successful forum answers ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,359 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,370 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans