Good Day and thank you for your interest.
We have a business requirement to show or hide a quickview form control on the Opportunity form in CRM. I am aware of the hiding section method where the quickview is on the section and we can utilize the JS to hide the entire section. However, that method does not apply to our business use because the quickview is located in conjunction with other fields. Attached are images to reflect the descriptions. Kindly advise and share sample code if possible.
Thank you and Best Regards,
Arslan
Hi Arslan001,
You could use formContext.ui.quickForms.get(arg) to get your quick view form control. The parameter arg should be the quick view index or quick view name. Then use setVisible(bool) to show or hide it.
You can get quick view name from here:
The sample code is like this:
function hideQuickForm(execuationContext){
var formContext = execuationContext.getFormContext();
//get the quick view control
var quickViewControl = formContext.ui.quickForms.get("contactquickform");
//hide the quick view
quickViewControl.setVisible(false);
}
Reference:
formContext.ui.quickForms (Client API reference) in model-driven apps - Power Apps | Microsoft Learn
Hi,
Try below code
formContext.getControl(arg).setVisible(false);
Replace are with "yourquickviewname"
Stay up to date on forum activity by subscribing. You can also customize your in-app and email Notification settings across all subscriptions.
André Arnaud de Cal... 290,522 Super User 2024 Season 2
Martin Dráb 228,441 Most Valuable Professional
nmaenpaa 101,148