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

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics CRM (Archived)

Modify load order of default javascript files in CRM

(0) ShareShare
ReportReport
Posted on by

Hi All,

We have implemented a customer portal for a client using Dynamics Portals online. We have to implement a web chat to talk to a bot built using the BotFramework on Azure. The test file given to us by the developer works 100% correctly, however when we implement this on the required pages in the portal we have a strange issue. When you send something to the bot, you will get a response then it will move the line you sent to below the bot response, for example you would expect to see this:

you: Hi

Bot: Hello, how can I help you?

but what we are getting is, you send "Hi" then:

Bot: Hello how can I help you?

Hi

I have managed to source the cause of this to the javascript file "default-1033.bundle.js". This is a default CRM portal file. I have created a static html dump from the the loaded webpage in the browser and then edited that file. If I move the line that loads the default-1033 file to the start of the html instead of the end where it is inserted by CRM portals then the issue goes away and the portal page chat window behaves just like the test page from the developer.

I have tried using JS to force the js for the chat window to only load after default-1033.bundle.js but have not been successful.

Does anyone have a supported way in Portals to change the load order of default-1033.bundle.js?

*This post is locked for comments

I have the same question (0)
  • PranavShroti Profile Picture
    4,510 on at

    Hi I have integrated Bot with my CRM Portal as well. Check out my blog link.

    pranavshroti.blogspot.com/.../azure-chatbot-integration-with-dynamics.html

    I think what you need is a proactive message from Bot as soon as user clicks the "Chat" button: Check out more details here.

    docs.microsoft.com/.../bot-builder-nodejs-proactive-messages

    I have also created a proactive bot with works fine within CRM and Portal both. Messages are controlled by Bot Framework and will behave exactly like test window.

    Regards,

    Pranav

    If found useful, please mark the answer as verified

  • Community Member Profile Picture
    on at

    Hi Pranav,

    This won't work for us as you use the Iframe method to embed your bot chat in the portal. We are using the DirectLine on the bot framework so we are able to pass custom data to the bot such as the user and other information for the bot to generate a personalized experience for the user. this means we have to use the WebChat js (github.com/.../BotFramework-WebChat), so the bot itself is not controlling the conversation item order.

    The issue is not in the bot itself either as the webchat.js does present the conversation items in the correct order, there is some javascript in default-1033.bundle.js that messes with the items in the <ul> list when actually displaying them.

  • PranavShroti Profile Picture
    4,510 on at

    I have done it using Directline bot as well... we were facing different issues in that so dropped the idea. I will try to dig in my source control and get you the code.

    Regards,

    Pranav

  • Community Member Profile Picture
    on at

    Hi Pranav,

    have you managed to find this code?

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 > 🔒一 Microsoft Dynamics CRM (Archived)

#1
SA-08121319-0 Profile Picture

SA-08121319-0 4

#1
Calum MacFarlane Profile Picture

Calum MacFarlane 4

#3
Alex Fun Wei Jie Profile Picture

Alex Fun Wei Jie 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans