PhuocLe - Microsoft Dynamics CRM

CRM Grid Plus 1.3.6 Sep/20/2016

What new for this release

  • Added popup select color
  • Added build-in function: ADD_DAYS
  • Added parameters: CURRENT_MONTH, CURRENT_YEAR
  • Added operator BETWEEN on DateTime column

Download: https://crmgridplus.codeplex.com

Category: CRM

Hide Next Stage, Set Active, Back Button in Business Process Flows Aug/16/2016

I have a requirement in my current project that hide Next Stage, SetActive and Back button in the Business Process Flows

To do that, I used an unsupported code below.

function hideBPFButton() {
    hideBPFButtons();
    window.addEventListener("resize", hideBPFButtons);
    Xrm.Page.data.process.addOnStageSelected(hideBPFButtons);
}

function hideBPFButtons() {
    var dom = (Xrm == undefined || Xrm.Internal == undefined || Xrm.Internal.isTurboForm() == undefined || Xrm.Internal.isTurboForm() == false) ? document : parent.document;
    $("#stageSetActiveActionContainer", dom).remove();
    $("#stageBackActionContainer", dom).remove();
    $("#stageNavigateActionContainer", dom).remove();
    setTimeout(function () { $("#processStagesContainer", dom).width(1894); }, 50);
}

In the form OnLoad, call function

hideBPFButton();

Before apply code

 

After apply code

 

 

How to program change stage, set active, ....

  • Client side: check Xrm.Page.data.process and Xrm.Page.ui.process
  • Server side: reference 3 fields in the entity record, update these fields and update entity record.
    • processid
      • query processid by Process Name in entity workflow
        
          
            
            
              
              
              
            
          
        
    • stageid
      • query stageid by processid and Stage Name in entity processstage
        
          
            
            
              
              
            
          
        
    • traversedpath
      • combine entity id string. Eg. in this case leadid,opportunityid,quoteid,salesorderid (seperator use comma)

Checked, Tested work with CRM2016, CRM2016 SP1, CRM2016 Online

Unsupported code, use it with your own risk.

Category: CRM

Add more buttons in the form sub-grid Aug/10/2016

Sometime, your business requirement need add some buttons in the form sub-grid like picture below (Account form, sub-grid Contacts).

How I can do that

1. Prepare 2 web-resource png image 16x16 file.

  • 1 for normal button
  • 1 for hover button

2. Copy function below to your main js web-resource file

function createButton(grid, buttonName, buttonTooltip, buttonImage, buttonImageHover, callback) {    
    if (grid == null || grid.length == 0) return;
    if (buttonName == null || buttonName.length == 0) return;
    if (buttonImage == null || buttonImage.length == 0) return;    
    var dom = (Xrm == undefined || Xrm.Internal == undefined || Xrm.Internal.isTurboForm() == undefined || Xrm.Internal.isTurboForm() == false) ? document : parent.document;   
    var button = dom.getElementById(grid + "_addImageButton");
    if (button == null || button.parentNode == null || button.parentNode.parentNode == null) return;
    var tooltip = "";
    if (buttonTooltip != null && buttonTooltip.length > 0) 
        tooltip = " title='" + buttonTooltip + "' alt='" + buttonTooltip + "' ";    
    var div = dom.createElement("div");
    div.className = "ms-crm-contextButton";
    div.innerHTML = "<a href='#' id='" + buttonName +"' style='display:block;cursor:pointer;'" + tooltip + "><img id='"+ buttonName +"Image' src='" + buttonImage + "'" + tooltip + "></a>";
    button.parentNode.parentNode.appendChild(div);
    if (buttonImageHover != null) {
        dom.getElementById(buttonName).onmouseover = function () {
            dom.getElementById(buttonName + "Image").src = buttonImageHover;
        }
        dom.getElementById(buttonName).onmouseout = function () {
            dom.getElementById(buttonName + "Image").src = buttonImage;
        }
    }
    dom.getElementById(buttonName).onclick = callback;
}

Noted: this function already check Turbo form or not

3. On the on-load form, add the following code to add button to form sub-grid

createButton("Contacts", "btnViewChart", "View Chart", "../WebResources/pl_chart.png", "../WebResources/pl_chart_hover.png", function() {
    alert("View Chart Click");
});

Function parameters

  • grid: is the name of the sub-grid you add on form, in this case: Contacts, (required)
  • buttonName: because you can add more buttons, so you need enter the unique buttonName, in this case: btnViewChart (required)
  • buttonTooltip: the tooltip of this button, in this case: View Chart (optional)
  • buttonImage: the normal image button that you prepare in step 1, in this case: ../WebResources/pl_chart.png (required)
  • buttonImageHover: the hover button that you prepare in step 1, in this case: ../WebResources/pl_chart_hover.png (optional)
  • callback: a callback function after user click on button. (required)

4. Published and tested. I already tested on CRM2016 SP1 and CRM2016 Online.

Again, unsupported code, use it with your own risk.

Category: CRM

View FetchXML Aug/04/2016

Working with Dynamics CRM I often use FetchXML to retrive data. I used Advanced Find window, build query, download and view by XML editor.

Sometime, it take some clicks to view and some seconds waiting the XML editor load. To minimize clicks and waiting times, I created a small solution View FetchXML that view FetchXML on the fly in the Advanced Find window.

I uploaded this solution to CodePlex: https://viewfetchxml.codeplex.com

Hope this solution help you reduce clicks and waiting time (In this case, it help me a lot)

This solution I use some upsupported code.

Remove items in the Look for on Advanced Find window Jul/08/2016

Today I got a requirement from our client: hide/remove item from combobox Look for in the advanced find window with all roles in the system. (it mean, included System Administrator role)

After some hours working, I found the solution, and I post it here.

Before hide/remove

 

After hide/remove

Note: user Phuoc LV have an Administrator role, I hide/remove all entites, just keep 3 entities: account, contact, lead

Solution

1. Javascript web resource

  • Name: new_scripts/utilities/AdvancedFind.js
  • Display Name: new_scripts/utilities/AdvancedFind.js
var entities = [
    //'account',//Account
    'accountleads',//AccountLeads
    'activitymimeattachment',//ActivityMimeAttachment
    'activityparty',//ActivityParty
    'activitypointer',//ActivityPointer
    'advancedsimilarityrule',//AdvancedSimilarityRule
    'annotation',//Annotation
    'annualfiscalcalendar',//AnnualFiscalCalendar
    'applicationfile',//ApplicationFile
    'appointment',//Appointment
    'asyncoperation',//AsyncOperation
    'attachment',//Attachment
    'attributemap',//AttributeMap
    'audit',//Audit
    'authorizationserver',//AuthorizationServer
    'azureserviceconnection',//AzureServiceConnection
    'bookableresource',//BookableResource
    'bookableresourcebooking',//BookableResourceBooking
    'bookableresourcebookingheader',//BookableResourceBookingHeader
    'bookableresourcecategory',//BookableResourceCategory
    'bookableresourcecategoryassn',//BookableResourceCategoryAssn
    'bookableresourcecharacteristic',//BookableResourceCharacteristic
    'bookableresourcegroup',//BookableResourceGroup
    'bookingstatus',//BookingStatus
    'bulkdeletefailure',//BulkDeleteFailure
    'bulkdeleteoperation',//BulkDeleteOperation
    'bulkoperation',//BulkOperation
    'bulkoperationlog',//BulkOperationLog
    'businessdatalocalizedlabel',//BusinessDataLocalizedLabel
    'businessprocessflowinstance',//BusinessProcessFlowInstance
    'businessunit',//BusinessUnit
    'businessunitmap',//BusinessUnitMap
    'businessunitnewsarticle',//BusinessUnitNewsArticle
    'calendar',//Calendar
    'calendarrule',//CalendarRule
    'campaign',//Campaign
    'campaignactivity',//CampaignActivity
    'campaignactivityitem',//CampaignActivityItem
    'campaignitem',//CampaignItem
    'campaignresponse',//CampaignResponse
    'category',//Category
    'channelaccessprofile',//ChannelAccessProfile
    'channelaccessprofileentityaccesslevel',//ChannelAccessProfileEntityAccessLevel
    'channelaccessprofilerule',//ChannelAccessProfileRule
    'channelaccessprofileruleitem',//ChannelAccessProfileRuleItem
    'channelproperty',//ChannelProperty
    'channelpropertygroup',//ChannelPropertyGroup
    'characteristic',//Characteristic
    'childincidentcount',//ChildIncidentCount
    'clientupdate',//ClientUpdate
    'columnmapping',//ColumnMapping
    'commitment',//Commitment
    'competitor',//Competitor
    'competitoraddress',//CompetitorAddress
    'competitorproduct',//CompetitorProduct
    'competitorsalesliterature',//CompetitorSalesLiterature
    'complexcontrol',//ComplexControl
    'connection',//Connection
    'connectionrole',//ConnectionRole
    'connectionroleassociation',//ConnectionRoleAssociation
    'connectionroleobjecttypecode',//ConnectionRoleObjectTypeCode
    'constraintbasedgroup',//ConstraintBasedGroup
    //'contact',//Contact
    'contactinvoices',//ContactInvoices
    'contactleads',//ContactLeads
    'contactorders',//ContactOrders
    'contactquotes',//ContactQuotes
    'contract',//Contract
    'contractdetail',//ContractDetail
    'contracttemplate',//ContractTemplate
    'convertrule',//ConvertRule
    'convertruleitem',//ConvertRuleItem
    'customcontrol',//CustomControl
    'customcontroldefaultconfig',//CustomControlDefaultConfig
    'customcontrolresource',//CustomControlResource
    'customeraddress',//CustomerAddress
    'customeropportunityrole',//CustomerOpportunityRole
    'customerrelationship',//CustomerRelationship
    'dataperformance',//DataPerformance
    'delveactionhub',//DelveActionHub
    'dependency',//Dependency
    'dependencyfeature',//DependencyFeature
    'dependencynode',//DependencyNode
    'discount',//Discount
    'discounttype',//DiscountType
    'displaystring',//DisplayString
    'displaystringmap',//DisplayStringMap
    'documentindex',//DocumentIndex
    'documenttemplate',//DocumentTemplate
    'duplicaterecord',//DuplicateRecord
    'duplicaterule',//DuplicateRule
    'duplicaterulecondition',//DuplicateRuleCondition
    'dynamicproperty',//DynamicProperty
    'dynamicpropertyassociation',//DynamicPropertyAssociation
    'dynamicpropertyinstance',//DynamicPropertyInstance
    'dynamicpropertyoptionsetitem',//DynamicPropertyOptionSetItem
    'email',//Email
    'emailhash',//EmailHash
    'emailsearch',//EmailSearch
    'emailserverprofile',//EmailServerProfile
    'emailsignature',//EmailSignature
    'entitlement',//Entitlement
    'entitlementchannel',//EntitlementChannel
    'entitlementcontacts',//EntitlementContacts
    'entitlementproducts',//EntitlementProducts
    'entitlementtemplate',//EntitlementTemplate
    'entitlementtemplatechannel',//EntitlementTemplateChannel
    'entitlementtemplateproducts',//EntitlementTemplateProducts
    'entitymap',//EntityMap
    'equipment',//Equipment
    'exchangesyncidmapping',//ExchangeSyncIdMapping
    'externalparty',//ExternalParty
    'externalpartyitem',//ExternalPartyItem
    'fax',//Fax
    'feedback',//Feedback
    'fieldpermission',//FieldPermission
    'fieldsecurityprofile',//FieldSecurityProfile
    'filtertemplate',//FilterTemplate
    'fixedmonthlyfiscalcalendar',//FixedMonthlyFiscalCalendar
    'goal',//Goal
    'goalrollupquery',//GoalRollupQuery
    'hierarchyrule',//HierarchyRule
    'hierarchysecurityconfiguration',//HierarchySecurityConfiguration
    'imagedescriptor',//ImageDescriptor
    'import',//Import
    'importdata',//ImportData
    'importentitymapping',//ImportEntityMapping
    'importfile',//ImportFile
    'importjob',//ImportJob
    'importlog',//ImportLog
    'importmap',//ImportMap
    'incident',//Incident
    'incidentknowledgebaserecord',//IncidentKnowledgeBaseRecord
    'incidentresolution',//IncidentResolution
    'integrationstatus',//IntegrationStatus
    'internaladdress',//InternalAddress
    'interprocesslock',//InterProcessLock
    'invaliddependency',//InvalidDependency
    'invoice',//Invoice
    'invoicedetail',//InvoiceDetail
    'isvconfig',//IsvConfig
    'kbarticle',//KbArticle
    'kbarticlecomment',//KbArticleComment
    'kbarticletemplate',//KbArticleTemplate
    'knowledgearticle',//KnowledgeArticle
    'knowledgearticleincident',//KnowledgeArticleIncident
    'knowledgearticlescategories',//KnowledgeArticlesCategories
    'knowledgearticleviews',//KnowledgeArticleViews
    'knowledgebaserecord',//KnowledgeBaseRecord
    'knowledgesearchmodel',//KnowledgeSearchModel
    'languagelocale',//LanguageLocale
    //'lead',//Lead
    'leadaddress',//LeadAddress
    'leadcompetitors',//LeadCompetitors
    'leadproduct',//LeadProduct
    'letter',//Letter
    'license',//License
    'list',//List
    'listmember',//ListMember
    'localconfigstore',//LocalConfigStore
    'lookupmapping',//LookUpMapping
    'mailbox',//Mailbox
    'mailboxstatistics',//MailboxStatistics
    'mailboxtrackingfolder',//MailboxTrackingFolder
    'mailmergetemplate',//MailMergeTemplate
    'metadatadifference',//MetadataDifference
    'metric',//Metric
    'mobileofflineprofile',//MobileOfflineProfile
    'mobileofflineprofileitem',//MobileOfflineProfileItem
    'mobileofflineprofileitemassociation',//MobileOfflineProfileItemAssociation
    'monthlyfiscalcalendar',//MonthlyFiscalCalendar
    'msdyn_postalbum',//msdyn_PostAlbum
    'msdyn_postconfig',//msdyn_PostConfig
    'msdyn_postruleconfig',//msdyn_PostRuleConfig
    'msdyn_wallsavedquery',//msdyn_wallsavedquery
    'msdyn_wallsavedqueryusersettings',//msdyn_wallsavedqueryusersettings
    'multientitysearch',//MultiEntitySearch
    'multientitysearchentities',//MultiEntitySearchEntities
    'notification',//Notification
    'officedocument',//OfficeDocument
    'officegraphdocument',//OfficeGraphDocument
    'opportunity',//Opportunity
    'opportunityclose',//OpportunityClose
    'opportunitycompetitors',//OpportunityCompetitors
    'opportunityproduct',//OpportunityProduct
    'orderclose',//OrderClose
    'organization',//Organization
    'organizationstatistic',//OrganizationStatistic
    'organizationui',//OrganizationUI
    'orginsightsmetric',//OrgInsightsMetric
    'owner',//Owner
    'ownermapping',//OwnerMapping
    'partnerapplication',//PartnerApplication
    'personaldocumenttemplate',//PersonalDocumentTemplate
    'phonecall',//PhoneCall
    'picklistmapping',//PickListMapping
    'pluginassembly',//PluginAssembly
    'plugintracelog',//PluginTraceLog
    'plugintype',//PluginType
    'plugintypestatistic',//PluginTypeStatistic
    'position',//Position
    'post',//Post
    'postcomment',//PostComment
    'postfollow',//PostFollow
    'postlike',//PostLike
    'postregarding',//PostRegarding
    'postrole',//PostRole
    'pricelevel',//PriceLevel
    'principalattributeaccessmap',//PrincipalAttributeAccessMap
    'principalentitymap',//PrincipalEntityMap
    'principalobjectaccess',//PrincipalObjectAccess
    'principalobjectaccessreadsnapshot',//PrincipalObjectAccessReadSnapshot
    'principalobjectattributeaccess',//PrincipalObjectAttributeAccess
    'principalsyncattributemap',//PrincipalSyncAttributeMap
    'privilege',//Privilege
    'privilegeobjecttypecodes',//PrivilegeObjectTypeCodes
    'processsession',//ProcessSession
    'processstage',//ProcessStage
    'processtrigger',//ProcessTrigger
    'product',//Product
    'productassociation',//ProductAssociation
    'productpricelevel',//ProductPriceLevel
    'productsalesliterature',//ProductSalesLiterature
    'productsubstitute',//ProductSubstitute
    'publisher',//Publisher
    'publisheraddress',//PublisherAddress
    'quarterlyfiscalcalendar',//QuarterlyFiscalCalendar
    'queue',//Queue
    'queueitem',//QueueItem
    'queueitemcount',//QueueItemCount
    'queuemembercount',//QueueMemberCount
    'queuemembership',//QueueMembership
    'quote',//Quote
    'quoteclose',//QuoteClose
    'quotedetail',//QuoteDetail
    'ratingmodel',//RatingModel
    'ratingvalue',//RatingValue
    'recommendationcache',//RecommendationCache
    'recommendationmodel',//RecommendationModel
    'recommendationmodelmapping',//RecommendationModelMapping
    'recommendationmodelversion',//RecommendationModelVersion
    'recommendationmodelversionhistory',//RecommendationModelVersionHistory
    'recommendeddocument',//RecommendedDocument
    'recordcountsnapshot',//RecordCountSnapshot
    'recurrencerule',//RecurrenceRule
    'recurringappointmentmaster',//RecurringAppointmentMaster
    'relationshiprole',//RelationshipRole
    'relationshiprolemap',//RelationshipRoleMap
    'replicationbacklog',//ReplicationBacklog
    'report',//Report
    'reportcategory',//ReportCategory
    'reportentity',//ReportEntity
    'reportlink',//ReportLink
    'reportvisibility',//ReportVisibility
    'resource',//Resource
    'resourcegroup',//ResourceGroup
    'resourcegroupexpansion',//ResourceGroupExpansion
    'resourcespec',//ResourceSpec
    'ribboncommand',//RibbonCommand
    'ribboncontextgroup',//RibbonContextGroup
    'ribboncustomization',//RibbonCustomization
    'ribbondiff',//RibbonDiff
    'ribbonrule',//RibbonRule
    'ribbontabtocommandmap',//RibbonTabToCommandMap
    'role',//Role
    'roleprivileges',//RolePrivileges
    'roletemplate',//RoleTemplate
    'roletemplateprivileges',//RoleTemplatePrivileges
    'rollupfield',//RollupField
    'rollupjob',//RollupJob
    'rollupproperties',//RollupProperties
    'routingrule',//RoutingRule
    'routingruleitem',//RoutingRuleItem
    'salesliterature',//SalesLiterature
    'salesliteratureitem',//SalesLiteratureItem
    'salesorder',//SalesOrder
    'salesorderdetail',//SalesOrderDetail
    'salesprocessinstance',//SalesProcessInstance
    'savedorginsightsconfiguration',//SavedOrgInsightsConfiguration
    'savedquery',//SavedQuery
    'savedqueryvisualization',//SavedQueryVisualization
    'sdkmessage',//SdkMessage
    'sdkmessagefilter',//SdkMessageFilter
    'sdkmessagepair',//SdkMessagePair
    'sdkmessageprocessingstep',//SdkMessageProcessingStep
    'sdkmessageprocessingstepimage',//SdkMessageProcessingStepImage
    'sdkmessageprocessingstepsecureconfig',//SdkMessageProcessingStepSecureConfig
    'sdkmessagerequest',//SdkMessageRequest
    'sdkmessagerequestfield',//SdkMessageRequestField
    'sdkmessageresponse',//SdkMessageResponse
    'sdkmessageresponsefield',//SdkMessageResponseField
    'semiannualfiscalcalendar',//SemiAnnualFiscalCalendar
    'service',//Service
    'serviceappointment',//ServiceAppointment
    'servicecontractcontacts',//ServiceContractContacts
    'serviceendpoint',//ServiceEndpoint
    'sharepointdata',//SharePointData
    'sharepointdocument',//SharePointDocument
    'sharepointdocumentlocation',//SharePointDocumentLocation
    'sharepointsite',//SharePointSite
    'similarityrule',//SimilarityRule
    'site',//Site
    'sitemap',//SiteMap
    'sla',//SLA
    'slaitem',//SLAItem
    'slakpiinstance',//SLAKPIInstance
    'socialactivity',//SocialActivity
    'socialinsightsconfiguration',//SocialInsightsConfiguration
    'socialprofile',//SocialProfile
    'solution',//Solution
    'solutioncomponent',//SolutionComponent
    'sqlencryptionaudit',//SqlEncryptionAudit
    'statusmap',//StatusMap
    'stringmap',//StringMap
    'subject',//Subject
    'subscription',//Subscription
    'subscriptionclients',//SubscriptionClients
    'subscriptionmanuallytrackedobject',//SubscriptionManuallyTrackedObject
    'subscriptionstatisticsoffline',//SubscriptionStatisticsOffline
    'subscriptionstatisticsoutlook',//SubscriptionStatisticsOutlook
    'subscriptionsyncentryoffline',//SubscriptionSyncEntryOffline
    'subscriptionsyncentryoutlook',//SubscriptionSyncEntryOutlook
    'subscriptionsyncinfo',//SubscriptionSyncInfo
    'subscriptiontrackingdeletedobject',//SubscriptionTrackingDeletedObject
    'syncattributemapping',//SyncAttributeMapping
    'syncattributemappingprofile',//SyncAttributeMappingProfile
    'syncerror',//SyncError
    'systemapplicationmetadata',//SystemApplicationMetadata
    'systemform',//SystemForm
    'systemuser',//SystemUser
    'systemuserbusinessunitentitymap',//SystemUserBusinessUnitEntityMap
    'systemuserlicenses',//SystemUserLicenses
    'systemusermanagermap',//SystemUserManagerMap
    'systemuserprincipals',//SystemUserPrincipals
    'systemuserprofiles',//SystemUserProfiles
    'systemuserroles',//SystemUserRoles
    'systemusersyncmappingprofiles',//SystemUserSyncMappingProfiles
    'task',//Task
    'team',//Team
    'teammembership',//TeamMembership
    'teamprofiles',//TeamProfiles
    'teamroles',//TeamRoles
    'teamsyncattributemappingprofiles',//TeamSyncAttributeMappingProfiles
    'teamtemplate',//TeamTemplate
    'template',//Template
    'territory',//Territory
    'textanalyticsentitymapping',//TextAnalyticsEntityMapping
    'theme',//Theme
    'timestampdatemapping',//TimeStampDateMapping
    'timezonedefinition',//TimeZoneDefinition
    'timezonelocalizedname',//TimeZoneLocalizedName
    'timezonerule',//TimeZoneRule
    'topic',//Topic
    'topichistory',//TopicHistory
    'topicmodel',//TopicModel
    'topicmodelconfiguration',//TopicModelConfiguration
    'topicmodelexecutionhistory',//TopicModelExecutionHistory
    'traceassociation',//TraceAssociation
    'tracelog',//TraceLog
    'traceregarding',//TraceRegarding
    'transactioncurrency',//TransactionCurrency
    'transformationmapping',//TransformationMapping
    'transformationparametermapping',//TransformationParameterMapping
    'unresolvedaddress',//UnresolvedAddress
    'uom',//UoM
    'uomschedule',//UoMSchedule
    'userapplicationmetadata',//UserApplicationMetadata
    'userentityinstancedata',//UserEntityInstanceData
    'userentityuisettings',//UserEntityUISettings
    'userfiscalcalendar',//UserFiscalCalendar
    'userform',//UserForm
    'usermapping',//UserMapping
    'userquery',//UserQuery
    'userqueryvisualization',//UserQueryVisualization
    'usersettings',//UserSettings
    'webresource',//WebResource
    'webwizard',//WebWizard
    'wizardaccessprivilege',//WizardAccessPrivilege
    'wizardpage',//WizardPage
    'workflow',//Workflow
    'workflowdependency',//WorkflowDependency
    'workflowlog',//WorkflowLog
    'workflowwaitsubscription',//WorkflowWaitSubscription

    //The custom entities define here
    'new_autonumber',//rbvh_AutoNumber
];
function isRemoveItems() {
    var select = $("#slctPrimaryEntity");
    if (select.length > 0) {
        for(var i = 0; i < entities.length; i++)
            $("#slctPrimaryEntity option[value='" + entities[i] + "']").remove();
    }
    //find and hide button
    var button = window.top.document.getElementById("new.ApplicationRibbon.Button.RemoveItems-Large");
    if (button !== undefined && button != null) button.style.display = "none";
    return false;
}

Note:

  • Line 2 to line 384 is the OOB entities, comment line to keep it in Look for
  • Line 387 is a custom entity that I don't want display in the Look for, you can add more custom entites from here

2. Create a temporary solution and export

3. Compare your export solution file: customizations.xml with my customizations.xml here and update correct to your customizations.xml file

<ImportExportXml xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
  <Entities></Entities>
  <Roles></Roles>
  <Workflows></Workflows>
  <FieldSecurityProfiles></FieldSecurityProfiles>
  <Templates />
  <RibbonDiffXml>
    <CustomActions>
      <CustomAction Id="new.ApplicationRibbon.Button.RemoveItems.CustomAction" Location="Mscrm.AdvancedFind.Groups.Debug.Controls._children" Sequence="35">
        <CommandUIDefinition>
          <Button Command="new.ApplicationRibbon.Command.RemoveItems" Id="new.ApplicationRibbon.Button.RemoveItems" Sequence="35" TemplateAlias="o1" />
        </CommandUIDefinition>
      </CustomAction>
    </CustomActions>
    <Templates>
      <RibbonTemplates Id="Mscrm.Templates"></RibbonTemplates>
    </Templates>
    <CommandDefinitions>
      <CommandDefinition Id="new.ApplicationRibbon.Command.RemoveItems">
        <EnableRules>
          <EnableRule Id="new.ApplicationRibbon.EnableRule.RemoveItems" />
        </EnableRules>
        <DisplayRules />
        <Actions />          
      </CommandDefinition>
    </CommandDefinitions>
    <RuleDefinitions>
      <TabDisplayRules />
      <DisplayRules />
      <EnableRules>
        <EnableRule Id="new.ApplicationRibbon.EnableRule.RemoveItems">
          <CustomRule FunctionName="isRemoveItems" Library="$webresource:new_scripts/utilities/AdvancedFind.js" Default="true" />
        </EnableRule>
      </EnableRules>
    </RuleDefinitions>
    <LocLabels />      
  </RibbonDiffXml>
  <EntityMaps />
  <EntityRelationships />
  <OrganizationSettings />
  <optionsets />
  <Languages>
    <Language>1033</Language>
  </Languages>
</ImportExportXml>

4. Update your temporary solution like my customizations.xml and import it again

5. Publish and Test

Hope this small trick help you hide/remove a lot of item not use in the advanced window.

If you have time, did you check CRM GRID PLUS add-on ?

Category: CRM