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 :
Microsoft Dynamics 365 | Integration, Dataverse...
Answered

GetControl("customerId ") returns null only in UCI

(0) ShareShare
ReportReport
Posted on by 47

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?

I have the same question (0)
  • Suggested answer
    Henry J. Profile Picture
    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 

  • Verified answer
    Tommy_G Profile Picture
    47 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

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…

Abhilash Warrier – Community Spotlight

We are honored to recognize Abhilash Warrier as our Community Spotlight honoree for…

Leaderboard > Microsoft Dynamics 365 | Integration, Dataverse, and general topics

#1
Sahan Hasitha Profile Picture

Sahan Hasitha 231

#2
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 83 Super User 2025 Season 2

#3
BillurSamdancioglu Profile Picture

BillurSamdancioglu 68 Most Valuable Professional

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans