Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics CRM (Archived)

Dynamics 365 App for Outlook JavaScript customizations

Posted on by 655

Folks,

I want to customize the forms for the Outlook Dynamics 365 app.  Specifically the form that creates a task.  I found a sample that shows how to 'Created dependent OptionSets (picklists)' and it works great in Dynamics 365.  The JavaScript code behaves correctly without issue.

The problem i'm encountering is in both Outlook for Web (OWA) IE11 and Outlook 2016.  The funny thing is that with Chrome i have absolutely NO problems!

In OWA using IE11 it errors out on this line:

//For each option value, get the definition from the attribute and add it to the control.
        validOptionValues.forEach(function (optionValue) {
            //Get the option defnition from the attribute
//Errors out on the line below var option = childFieldAttribute.getOption(parseInt(optionValue)); //Add the option to the control c.addOption(option); })

With the following error:

owaerr.PNG

For Outlook 2016, i get the following error:

8032.outlook.PNG

Can anyone see why it would fail in IE11 / Outlook (because it's using IE11 not default browser) and work correctly in Chrome?

*This post is locked for comments

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: Dynamics 365 App for Outlook JavaScript customizations

    Hi,

    Were you able to resolve the issue with the Outlook Desktop Application? Please let me know, as I ran into a similar issue.

    Thanks,

    Sravya

  • SavvyLuke Profile Picture
    SavvyLuke 655 on at
    RE: Dynamics 365 App for Outlook JavaScript customizations

    Hey there, it seems that there might be an issue with your JavaScript code.  My code was working for outlook for web but not within outlook itself.  What is your custom code supposed to do?

  • Abhinaya Profile Picture
    Abhinaya 40 on at
    RE: Dynamics 365 App for Outlook JavaScript customizations

    Hi Luke

    I am also getting error while creating case using dynamics 365 App in chrome as well as IE . I am using Outlook 2013. How did you rectify your errors?

    3806.Error.PNG

  • Tomi A. Profile Picture
    Tomi A. 15 on at
    RE: Dynamics 365 App for Outlook JavaScript customizations

    Ok, thanks for the reply!

  • SavvyLuke Profile Picture
    SavvyLuke 655 on at
    RE: Dynamics 365 App for Outlook JavaScript customizations

    Hi Tomi,

    I could not get it to work.  I just went with option sets that are not dependant and that seemed to work.

  • Tomi A. Profile Picture
    Tomi A. 15 on at
    RE: Dynamics 365 App for Outlook JavaScript customizations

    Hi Luke,

    Good question. Did you ever find a solution to this regarding the Outlook 2016 client?

    Thanks

    Tomi

  • Suggested answer
    SavvyLuke Profile Picture
    SavvyLuke 655 on at
    RE: Dynamics 365 App for Outlook JavaScript customizations

    Thanks for the reply Scott,

    I did check if my form was missing fields, but that was not the case.  I had to purge my cache in IE and then it worked.  I learned today that if it works in Chrome it should work in IE and ALWAYS purge cache before testing.

    It now works correctly in all browsers using Outlook for web access, but i'm still having a problem out of Outlook 2016.

  • Suggested answer
    ScottDurow Profile Picture
    ScottDurow 50,177 on at
    RE: Dynamics 365 App for Outlook JavaScript customizations

    Hi, there seems to be a number of different errors here - none of which correspond to that code!

    The most common reason for JavaScript not working on the app forms is that the form that is shown is the first form in the list and if it doesn't have the fields needed for the script then you'll get similar errors to those you are seeing. Check that the fields that the script needs are on the form.

    Hope this helps

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

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 Suggested Answers

Best practices for providing successful forum answers ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

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

#2
Martin Dráb Profile Picture

Martin Dráb 230,214 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans