Privileges by Entity (CRM 2015)

Sometimes, you need to programmatically check a certain privilege on an entity, for business purposes. If you played with user roles, you noticed that all the user roles defined on the main business unit are inherited on the child business units and cannot be altered at child business unit level. The approach below handles this… Continue reading Privileges by Entity (CRM 2015)

Hide New Button on Lookups and Subgrids – CRM 2013 & 2015

Sometimes, you don’t want the New button to be available for creating new records from a lookup or subgrid’s lookup: In order to hide the standard New button on a lookup, use the following function (works on both CRM 2013 and CRM 2015): function RemoveNewButtonFromLookUp(lookupName) { if(lookupName) { var lookUpControl = Xrm.Page.getControl(lookupName); if(lookUpControl) { lookUpControl.addPreSearch(function… Continue reading Hide New Button on Lookups and Subgrids – CRM 2013 & 2015

Activity typed Entity – Display in Activity Menus

Upon creating a custom entity as Activity Entity and not checking the “Display in Activity Menus” option, there is no supported way to alter this. However, here is the unsupported approach (in SQL): UPDATE Entity SET ActivityTypeMask = 1 WHERE EntityId = (SELECT EntityId FROM Entity WHERE Name = ‘custom_entity_schema_name’) After this minor adjustment, a… Continue reading Activity typed Entity – Display in Activity Menus