Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics 365 | Integration, Dataverse...
Suggested answer

Client API: All AddCustomView implementations broke overnight

Posted on by 202

Hi,

since this morning every implementation of the client API method addCustomView I have in the system has broken.

pastedimage1611054350393v1.png

Here is an example of a method for the bookable resource lookup in PSA time entries:

// only show bookable resources that are project team members
setBookableResourceCustomView() {
    let fetchXml = `
        
            
                
                
                
                
                
                    
                
                    
                        
                            
                        
                    
            
        
    `;

    let layoutXml = ''
    let bookableResourceControl = this.formContext.getControl('msdyn_bookableresource');
    let viewId = '1acbdc8f-4c1c-4091-9209-b9e60b665cfb'
    bookableResourceControl.addCustomView(viewId, 'bookableresource', 'Assigned resources', fetchXml, layoutXml, true);
}

 
I've tried different fetch xmls and layout xmls. Nothing seems to be working. Has anyone experienced this?
  • Suggested answer
    prt33k Profile Picture
    prt33k 6,907 on at
    RE: Client API: All AddCustomView implementations broke overnight

    Hi Thomas,

    I believe you need to open a support ticket with Microsoft. The error looks like an internal CRM error.

    Thanks,

    Prateek

  • cloflyMao Profile Picture
    cloflyMao 25,198 on at
    RE: Client API: All AddCustomView implementations broke overnight

    Hi, Thomas

    As your entities and their relationships are custom type, I have tried to create a lookup view with addCustomView method for Account entity in the main form of Contact.

    You can refer to this piece of code to modify your JS.

    8468.c1.png

    Then you can see a view named as "A Lookup View" being created in the field ‘Account Name’ of Contact main form.

    1460.c2.png

    And it can search by the condition set in the fetchXML.

    7180.c3.png

    Regards,

    Clofly

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,269 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,198 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Product updates

Dynamics 365 release plans