Dear All,
Can anyone help me to lock/unlock tabs or section?
I want to enable conditional fields editable.
Is there any script or configuration?
I am seeking your urgent support.
Thanks,
Hema
*This post is locked for comments
Dear All,
Can anyone help me to lock/unlock tabs or section?
I want to enable conditional fields editable.
Is there any script or configuration?
I am seeking your urgent support.
Thanks,
Hema
*This post is locked for comments
Hi Hema,
Is the field ("new_cafid") on the Tab or out of Tab on the Form. If the field on the Tab that is not good way to set the Tab unvisible because you never change the value. This field must be out of the Tab which you want to set depends of condition "setVisible()". Also you cannot use "TabStateChange" event for this reason. This event occurs when a tab is expanded or collapsed. Instead of Tab use your code on the Field OnChange event. Here in your case onChange event of "new_cafid".
I tested your code and it is working. I name the webresource as nec_lockTab (you can use any name doesn't important. Function name is same as your ( CIFApprovedChange)
instead of your field name ('new_cafid') I use existed field ('websiteurl') the Display name is 'Website' You can match as you wish to your environment. Upload your code to webresource.
Here some screenshot step by step
Open customization entity form and select Form properties.
add your code to form properties from webresources and select Control : Form Event: Onload and click on the Add button.
on the Handler Properties select Library: "your code name" Function: add your function name and finaly check Enabled.
again return to Form Properties and select Control: "your field display name" Event: OnChange and click on the Add button
on the Handler Properties select Library: "your code name" Function: add your function name and finaly check Enabled.
click Ok and also OK on the Form Properties and on the Entity Form select Save and then click on "Publish"
return to your entity and tested it must work smootly.
Hi,
On page load and tab click event I want to disable. I have added below code in web resources as Script JS.
function CIFApprovedChange() {
if(Xrm.Page.getAttribute('new_cafid').getValue() == null) {
alert ("testing");
Xrm.Page.ui.tabs.get('Screening').setVisible(false);
}
else {
Xrm.Page.ui.tabs.get('Screening').setVisible(true);
alert ("testing1");
}
}
This library I added to form property with on load event of the form plus on change event of the tab.
However, I am getting the following error.
Web resource method does not exist: CIFApprovedChange()
I don't know where I am making mistake.
Thanks for your support.
Hema
Hi Hema,
Can you give me more detail under which condition you want to lock/unlock tabs or section.
What is the name of tab/section you want to lock/unlock and under which condition it must work?
Thanks, Necdet. I am new to CRM technical part. Could you please assist me on how to add this code. I added it but it's throwing me an error.
Error message: Web resource method does not exist: Ticker Change
What function name I should mention while adding?
Thank you once again for your support.
Hema
If you have difficulty to match to Dynamics 365 here is another reference for the Dynamics 365:
Thanks for your reply. Is it applicable for CRM 365 as well?
Hi,
You can have following links as reference:
community.dynamics.com/.../crm2011-disable-enable-fields-sections-tabs-and-the-whole-form
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... 291,280 Super User 2024 Season 2
Martin Dráb 230,235 Most Valuable Professional
nmaenpaa 101,156