Uncategorized

{Model Driven App} dynamically change view on polymorphic/Multi table form field

In today’s blog, I will walk you through the process to show specific Entity view for Multi Table/Polymorphic lookup field based on another field value. Multi table lookup is to create a lookup field in Dynamics crm which will point to multiple enities. More details can be found on below link – https://staturestack.wordpress.com/2021/07/15/multi-table-lookup-polymorphic-lookup-field-in-dynamics-365-ce/ I have…… Continue reading {Model Driven App} dynamically change view on polymorphic/Multi table form field

Dynamics CRM Javascript · Javascript

{Dynamics CRM 365} Client Side Form event pipeline

You can define up to 50 event handlers for each event. Each event handler is executed in the order that it is displayed in the Event Handlers section in the Events tab of the Form Properties dialog box. Use the execution context getDepth method to know the sequence that an event handler is being executed in relative to other event handlers.…… Continue reading {Dynamics CRM 365} Client Side Form event pipeline

Dynamics CRM Javascript · Javascript

Dynamics CRM Prepopulate To Activity Party on Email when multiple/single records selected from grid

Recently we had a requirement to open Email entity form with To field prepopulated with the selected records from grid. We have added custom button on grid using Ribbon Workbench Tool and added Action to call below Javascript on click on button. function OpenQuickCreateemail(selectedItems) { var partylist = []; if (selectedItems.length == 1) { OpenQuickCreateemailsingleRecorde(selectedItems);…… Continue reading Dynamics CRM Prepopulate To Activity Party on Email when multiple/single records selected from grid

Dynamics CRM Javascript · Javascript

{Code Snippet}Accessing Subgrid on QuickView Form (Control) through JavaScript in Dynamics 365

To Access subgrid control which is available on Quick form control use below code. function AddMembers(executionContext) { var formContext=executionContext.getFormContext(); var quickviewControl = formContext.ui.quickForms.get(“Member”); if (quickviewControl != undefined) { if (quickviewControl.isLoaded()) { alert(“Loaded”); var grid = quickviewControl.getControl(“QuickMembers”); var selectedRows = quickviewControl.getControl(“QuickMembers”).getGrid().getSelectedRows(); } else { setTimeout(AddMembers, 300, executionContext); } } }   The data binding for the…… Continue reading {Code Snippet}Accessing Subgrid on QuickView Form (Control) through JavaScript in Dynamics 365

Dynamics CRM Javascript · Javascript · Unsupported Customization

{Unsupported Customization}How to change the name of ‘Timeline’?

In the new version, Notes is changed as Timeline. I want to change the name of timeline, I tried to change the name of the below figure, but it is not work. Does anyone know how to change its name? To the best of my knowledge, the text/title of timeline couldn’t be modified, it is front-side…… Continue reading {Unsupported Customization}How to change the name of ‘Timeline’?

D365 Error · Dynamics CRM Javascript · Javascript

Dynamics CRM Javascript Error Cannot read property ‘getFormContext’ of undefined

If you are getting “Cannot read property ‘getFormContext’ of undefined” error, please make sure that you check “Pass execution context as first parameter” checkbox in the event handler properties. Random Javascript code to Hide Quote sungrid on Oppotunity based on Two option field Requirement Forum link – https://community.dynamics.com/365/sales/f/dynamics-365-for-sales-forum/394826/locking-ability-to-create-quote-until-required-approvals-met/1065876#1065876 function HideQuoteTab(executionContext) { alert(“Triggered”); var _formContext=executionContext.getFormContext(); if(_formContext.getAttribute(“new_approved”).getValue()…… Continue reading Dynamics CRM Javascript Error Cannot read property ‘getFormContext’ of undefined

Dynamics CRM Javascript · Dynamics CRM Ribbon Customization · Javascript

Get Parent and Child Entity Name Dynamically on ribbon button custom rule

To get parent and child entity name from ribbon button custom javascript rule we need to pass 2 CRM parameters from action rule. PrimaryEntityTypeName SelectedEntityTypeName I have created new solution and added account entity. I opened this solution in ribbon workbench and added 2 button one on main form and other on subgrid. I passed…… Continue reading Get Parent and Child Entity Name Dynamically on ribbon button custom rule

Dynamics CRM Javascript · Javascript

Dynamics CRM 365 Deep dive into Xrm.Utility.lookupObjects

To open lookup control on HTML web resource use below code. function openMarketingList() { var imgButton = $(“#crmOtherLookup”).attr(“src”); if (imgButton == “/_imgs/btn_off_lookup.png”) { var objectTypeCode = 4300; var lookupParameters = {}; //specify the list of entity types to be displayed in lookup dialog lookupParameters.entityTypes = [“list”]; //Sepecify the default entityType need to be displayed lookupParameters.defaultEntityType…… Continue reading Dynamics CRM 365 Deep dive into Xrm.Utility.lookupObjects

Dynamics CRM Javascript · Javascript

{Dynamics CRM 365} Disable fields in Editable Grid View using Javascript

Sometimes we get the requirement from our client to disable fields based on some conditions on Editable grid views. To disable fields on Editable Grid views, We can write javascript code on OnRecordSelect event handler of Editable Grid. [Step – 1] Create new web resource and add below Javascript code. function onRecordSelect(exeContext) { //debugger; var…… Continue reading {Dynamics CRM 365} Disable fields in Editable Grid View using Javascript

Dynamics CRM Javascript · Javascript · Low Code No Code

{Dynamics 365} Lock a field after saving a record

Wondering if we can disable a field after save. For example, when user creates a new record, it is editable, but after save, it not editable. Low Code No Code solution To achieve this requirement we can make use of Business Rule where we can check if CreatedOn field contains data and if true lock…… Continue reading {Dynamics 365} Lock a field after saving a record