Notifications
Announcements
No record found.
What is the most efficient way to hide fields across tabs in the same form?
Business Rules Screen gets too complex as the number of fields increase.
Please help, thanks.
*This post is locked for comments
You can use javscript to hide fields
by tab, by section or by individual field itself
use true to show false to hide tab directly
var tab = Xrm.Page.ui.tabs.get("tabname");
tab.setVisible(false); // show/hide
//for show hide fields in a tab
tab.sections.forEach(function (section, sectionIndex) {
section.controls.forEach(function (control, controlIndex) {
try {
var attribute = control.getAttribute();
var attname = attribute.getName();
Xrm.Page.getAttribute(attname).setVisible(false);
} catch (e) {
}
});
Hi Kashyap,
If you have too many conditions then you can use javascript, to hide the fields.
Hi KashyapT,
It would be better to create js in case of multiple if conditions.
Xrm.Page.ui.tabs.get("tabName").sections.forEach(function (section, sectionIndex) {
section.controls.forEach(function (control, index) {
control.getAttribute().setVisible("true/false");
Please refer below url for reference:
community.dynamics.com/.../retrieve-all-of-the-field-names-in-a-tab
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.
As AI tools become more common, we’re introducing a Responsible AI Use…
We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…
These are the community rock stars!
Stay up to date on forum activity by subscribing.
SA-08121319-0 4
Calum MacFarlane 4
Alex Fun Wei Jie 2