Skip to main content

Notifications

Microsoft Dynamics 365 | Integration, Dataverse...
Answered

GetControl("customerId ") returns null only in UCI

Posted on by 30

Hello,

We are using Dynamic CRM 365 on-premises version: 9.0.24.8.

I have encountered that getcontrol in javascript on UCI returns null in some fields, which doesn't occur in classic.

In this case it's about "customerId" lookup field in incident entity.

Example in UCI:

FormOnLoad: function (executionContext) {
     var formContext = executionContext.getFormContext();

     var customerIdControl = formContext.getControl("customerid"); // returns null
     var customerIdAttribute = formContext.getAttribute("customerid"); // returns an object
}

I have tried to use getControl to see if i can find it in the array.
example just formContext.getControl() and it returns a array. I couldn't find customerid in that array in UCI, but when i did it on classic customerid was there.

Is this a intended behaviour or do I have to do something to make customerid available in UCI?

  • Verified answer
    Tommy_G Profile Picture
    Tommy_G 30 on at
    RE: GetControl("customerId ") returns null only in UCI

    Hello Henry,

    ahh, i see. It's a pity...
    But I did manage to solve this problem with an workaround by using the getAttribute.

    Example:
    formContext.getAttribute('customerid').controls.forEach(function (ctrl) {

    });

    thanks for the response and links.

    Sincerely
    Tommy

  • Suggested answer
    Henry J. Profile Picture
    Henry J. 5,237 on at
    RE: GetControl("customerId ") returns null only in UCI

    Hello Tommy,

    The version of Unified Interface that was introduced in Dynamics 365 Customer Engagement on-premises v9.0 was a very early version: it contained a lot of gaps and sometimes even issues in comparison to the web client. Because of these limitations, we actually don't recommend using it for production scenarios (unless they are really simple).

    It's important to note that the legacy web client is still supported for on-premise versions.
    Support lifecycle for these products is documented here: https://support.microsoft.com/en-us/lifecycle/search

    That being said, the v9.1 version of Dynamics 365 Customer Engagement on-premises is around the corner and is planned for Q2 of 2021.
    With a few limitations that will be documented, it should contain an updated version of Unified Interface that will be close to the capabilities that were released in the October 2020 online version (2020 Release Wave 2). 

    On your specific issue I recommend that you reach out to support if you feel like this is a product issue:
    Support for Microsoft Dynamics 365 and Microsoft Dynamics CRM | Microsoft Docs

    Henry 

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!

Community AMA December 12th

Join us as we continue to demystify the Dynamics 365 Contact Center

Leaderboard

#1
André Arnaud de Calavon Profile Picture

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

#2
Martin Dráb Profile Picture

Martin Dráb 230,188 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Product updates

Dynamics 365 release plans