Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics CRM (Archived)

Update records of quick view form based on lookup field

Posted on by Microsoft Employee

Hi everyone!

I have a lookup field Entitlement which is on Cases.

I added a quickView Form which has a subgrid with the Products associated for each Entitlement. 

I want when  i change the Entitlement to show/update the Products view .

I used this code :

function QuickViewFormRefresh() { 
    var quickViewControl = Xrm.Page.ui.quickForms.get("quickViewEntitlementProducts");

   if (quickViewControl != null) { 
       
         setTimeout(function () { 
             quickViewControl.refresh(); 
         }, 500); 
     } 
} 


Problem is : 

When you change the Entitlement to a new value , it also gets the null value and in this case the Products are not visible in the form . 

Also , it doesn't work . It won't update the values. It shows only the ones of the previous lookup value. 

Any ideas how to fix this?

*This post is locked for comments

  • Suggested answer
    Andreas Cieslik Profile Picture
    Andreas Cieslik 9,265 on at
    RE: Update records of quick view form based on lookup field

    You could validate if the field's value is null as a condition for your function to run.

    When you debug your code, is the refresh() line ever reached? Do you use old legacy form rendering or not?

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

Featured topics

Product updates

Dynamics 365 release plans