Hi All,
I am using sub grid in D365 Online
I want to disable "edit" option on sub grid based on the other field value in the form.
How can I achieve this.
Regards,
Babu
Hi All,
I am using sub grid in D365 Online
I want to disable "edit" option on sub grid based on the other field value in the form.
How can I achieve this.
Regards,
Babu
Hi All,
All good now
I used full namespace and function name in Ribbon work bench and my javascript got triggered
Regards,
Babu
Hi guys,
After doing some further research, I came to know that I am using wrong entity(Sorry for confusion)
Now I changed to correct Entity, but still my JavaScript function is not hitting and I can't hide the "Edit" button
How to make a function public and how to call it from Ribbon workbench by using full namespace. If you can give me some examples it will be great
Regards,
Babu
Thank you both for your replies,
Here is what I can see when I click on "Edit" button in ribbon work bench
Any other inputs please, I checked all the above points and looks fine, but still my debugger is not hitting
Regards,
Babu
Hi,
1.Check the Command is attached in the Button.
2.Put Debugger in the JavaScript and check the same weather the function is hitting or not
Hi,
Can you please check if you have attached command to your button?
I think you have created new command and added your js code but you will need to attach this command to your button.
Hi
Thanks for your reply.
I tried to implement same thing and just added alert in JavaScript, unfortunately I can't see any alert message, I don't know what went wrong any advise what to check
Regards,
Babu
Hi Narendra Sunkara,
You can create an Enable rule by Ribbon Workbench on your Edit button of related table in the subgrid. Please follow the steps:
1.Load your solution which contains the related table by Ribbon Workbench.
subgrid:
2. Customise Edit button's command and create an enable rule whose type is custom rule:
3. Create a JS type web resource whose code is like this:
function getControl(primaryControl){ var formContext = primaryControl; var title = formContext.getAttribute("title").getValue(); if(title && title == 'FW Support'){ return false; }else{ return true; } }
4. Select the library in step3 and type the function name:
5.Add the Enable rule to command and publish it:
Result:
Reference:
André Arnaud de Cal...
292,494
Super User 2025 Season 1
Martin Dráb
231,305
Most Valuable Professional
nmaenpaa
101,156