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 :
Dynamics 365 Release Wave Forum

AddCustomView function is not working in Unified Interface/ UCI

(0) ShareShare
ReportReport
Posted on by 40

Hi,

I am trying to analyse the client side script behavior in the UCI. I have multiple custom views that have been created for the lookups and I have observed that the addCustomView() function doesn't seem to work at all, i.e. the custom view is not seen in the list of lookups and the new "Change View" button gets disabled in case this function is used. 

Alternately, I also tried to use the lookupObjects function available in Xrm.Utility (https://butenko.pro/2017/11/22/microsoft-dynamics-365-v9-0-lookupobjects-closer-look/) but this doesn't seem to show the required filtering as well. Note that the lookups need filtering such that column from the related entity are used in the filtering condition i.e. linkentity needs to be used (hence customFilters can't be used). Please let me know if this code is deprecated, or if I am missing anything

Regards,

Anwesha

I have the same question (0)
  • Suggested answer
    Community Member Profile Picture
    on at
    RE: AddCustomView function is not working in Unified Interface/ UCI

    Thank you for the bug report.  This API is supported and we are tracking this failure internally.  

  • Anwesha Profile Picture
    40 on at
    RE: AddCustomView function is not working in Unified Interface/ UCI

    HI Tobin,

    Thanks for letting me know, in addition to this API, the setShowTime() API doens't work either, and setHours() on Date time field doesn't work.

    Regards,

    Anwesha

  • Remon Profile Picture
    1,485 on at
    RE: AddCustomView function is not working in Unified Interface/ UCI

    Having same issue, posting to monitor responses...

  • David Campbell - Tribunal Profile Picture
    10 on at
    RE: AddCustomView function is not working in Unified Interface/ UCI

    Having same issue, posting to monitor responses...

  • Mirella Profile Picture
    110 on at
    RE: AddCustomView function is not working in Unified Interface/ UCI

    Having same issue, posting to monitor responses...

  • Suggested answer
    David Campbell - Tribunal Profile Picture
    10 on at
    RE: AddCustomView function is not working in Unified Interface/ UCI

    I have managed to get formContext.getControl("attributeName").addCustomView(viewId, entityName, viewDisplayName, fetchXml, layoutXml, true); to work. My issue was I am using a fetchXML statement and I had a space at the beginning of the fetchXML statement. I removed the space and it works.

    var fetchXml = " <fetch version='1.0' output-format='xml-platform' mapping='logical' distinct='true'> " fix with var fetchXml = "<fetch version='1.0' output-format='xml-platform' mapping='logical' distinct='true'> "

  • Community Member Profile Picture
    on at
    RE: AddCustomView function is not working in Unified Interface/ UCI

    Hey, I worked on this issue and was finally able to get achieve this functionality in a supported way.

    you can find the answer on my Wordpress blog, Do like the page.

    sank8sinha.wordpress.com/.../

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

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans