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 :
Customer experience | Sales, Customer Insights,...
Suggested Answer

How to test JavaScript issue only in prod environment

(0) ShareShare
ReportReport
Posted on by 6

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.

I have the same question (0)
  • PabloCRP Profile Picture
    1,088 on at
    RE: How to test JavaScript issue only in prod environment

    Hi, thanks for asking, unfortunately will be hard to give you insight of what is happening.

    did that JS work before?

    suddenly it stops working?

    did you pass a recent solution to that environment?

    you can access to JS log by opening DevTool(f12 key) from your browser and take a look to your console and see whats happening.

    for solving that problem you'll need at least have ther error message that the JS is poping out, or setting a debugger in javascript webesource  and see what is doing.

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

    Hi,

    Console.log can be used to log actual error to browser control.

    Other option would be debug script from f12 window, you could attach debugger to line of code and trigger event and try to debug.

  • EmployeeOcta Profile Picture
    6 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.

  • Suggested answer
    meelamri Profile Picture
    13,216 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
    6 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
    13,216 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
    6 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
    13,216 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
    6 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
    13,216 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.

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…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > Customer experience | Sales, Customer Insights, CRM

#1
Tom_Gioielli Profile Picture

Tom_Gioielli 179 Super User 2025 Season 2

#2
#ManoVerse Profile Picture

#ManoVerse 110

#3
Gerardo Rentería García Profile Picture

Gerardo Rentería Ga... 61 Most Valuable Professional

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans