Hiding a ribbon button when specific Dynamics CRM Web Resource is in context -


like of dynamics crm programmers know, can add "web resources not associated entity" sitemap. if such customization made, when user clicks link, web resource opened , buttons in application ribbon added ribbon section of dynamics crm.

what wondering if there way can hide global buttons in application ribbon based on web resource on page.

let's added more 1 web resources sitemap, namely a.htm , b.htm. let's have custom button named x in application ribbon. right x displayed both a.htm , b.htm, in reality hide button when user clicks on b.htm sitemap.

is there way accomplish that?

you use following (unsupported) code hide ribbon button (the 'run workflow' button in example):

var btnrunworklfow=top.document.getelementbyid("account|norelationship|form|mscrm.form.account.runworkflow-large"); btnrunworklfow.style.display='none'; 

you can use ribbon editor available in codeplex disable button based on javascript.

refer to: http://crmvisualribbonedit.codeplex.com/


Comments

Popular posts from this blog

javascript - jQuery: Add class depending on URL in the best way -

caching - How to check if a url path exists in the service worker cache -

Redirect to a HTTPS version using .htaccess -