Open document on click of button in D365 CRM using JavaScript
In this blog we will see how we can open a PDF document on click of button from a record in CRM Let say we have User Guide button on Lead Entity and on click of User Guide button, a PDF document which is User Guide document should be open in next tab. Solution Create a solution and add lead entity only. Then open the same solution in XRM Toolbox – Ribbon Workbench var openUserGuide = { //openUserGuide.userGuide userGuide: function () { “use strict”; Xrm.Navigation.openUrl(“https://sinerleak.sharepoint.com/:b:/s/SingerLewak/EaQO2OWjWA1BnHFCCENV-6EBDkILbg3EfPSFLEu-KCeraw?e=ofVyVB”); } } 4. Add action to command and Publish the solution from XRM Toolbox Output –
Share Story :
Operations in Business Process Flow using JavaScript in D365 CRM
Introduction – In this blog, you will learn about how we can perform different operations such as disable, enable, hide, etc. on D365 CRM Business Process flow using JavaScript. Set value in Business Process Flow Disable field on Business Process Flow here cf_outreach is the schema name of the field on BPF. for BPF we need to write header_process before the schema name of the field Enable field on Business Process Flow Hide a field on Business Process Flow Mark Field Required on Business Process Flow Mark Field Optional on Business Process Flow Mark field recommended on Business Process Flow
Share Story :
Quick Tip – Enable/Show Activities on Notes in D365 CRM
In this blog, we will see how we can show activities on Notes in D365 CRM. Step 1 – Click on Entity and check marked Activities. Save and publish the Entity. Step 2 – Open Main form where you have added timeline, Double click on timeline notes and mark filter by as Show all. Save and Publish the form. Output before enabling the activities Output after enabling the activities
Share Story :
Read items from Array in Power Automate
Let us consider we have array [1,2,3] and want to read each value in Power automate. Let see how we can read array in Power Automate Step 1- Create array (here you can use your array) Here I have array [1,2,3] and now I want read each value of array in loop Step 2 – Add apply to each step In a apply to each step, Add output of array. In this case we have compose. Step 3 – Add action compose and use expression item() to read array from compose Now Save and try to run the flow. In this way you can read value from array in Power Automate
Share Story :
C# Code to retrieve lookup value id from target entity in D365 CE.
Let us consider below example as use case We have Plugin that triggers on Update of Contact Table and wanted to retrieve Customer related to Contacts. Customer is Lookup field on Contact Table. Hence here our target entity is Contact. Code – Entity targetEntity = (Entity)context.InputParameters[“Target”]; Guid ContactId = targetEntity.Id; Using the above code we get the target entity Contact Guid and now we need to retrieve Customer lookup from the target Entity. var cols = new ColumnSet(new String[] { “parentcustomerid” }); Since we only want Customer lookup from Contact hence retrieving only Customer and you can retrieve columns as per your requirement. Entity parententity = service.Retrieve(“contact”, targetEntity.Id, cols); We have stored Retrieved values in parententity. Guid ParentAccount = ((EntityReference)parententity.Attributes[“parentcustomerid”]).Id; And in above step we get the Guid of Customer. Conclusion – This was simple example of accounts and Contacts, you can use the above code(specify the schema name of lookup field you want to retrieve) to retrieve any lookups from your target entity based on your requirement Hope this helps !
Share Story :
Create attachments in SharePoint when email arrives
Use case – we wanted to retrieve attachment when new email arrives in outlook and create same file in SharePoint Let see how we can achieve this! Step 1 – Flow triggers on when a new email arrives trigger from Outlook connection. Step 2 – Retrieve attachments and Create file in SharePoint. Add step create file from SharePoint connection. In Create file, Add site address, Folder path, File name, File Content. Here file Content is the Attachment content from Trigger and File Name should be Attachment name. Save the flow and try. Hope this helps!
Share Story :
[Resolved]You don’t have permission to view files in this location, Contact your Microsoft team owner or SharePoint administrator for access.
We added a new User in CRM, User has the System Administrator role but still were getting the below error. You do not have permission to view files in this location, Contact your Microsoft team owner or SharePoint administrator for access. We did check User’s SharePoint access and, but it did not work. Solution – In User entity [OOB], there is OOB field called as “Sharepointemailaddress”. Add same email id of User -> save the record and it will be resolved. Hope this helps!
Share Story :
Disable field on change of tab in D365 CE
Use case – Our requirement is to enable field description field on invoice line form on clicking of tab General. Let’s see how we can achieve this Solution – Step 1 – Create web resource with below function- var invoiceLineCustomization = { unlockField : function(executionContext) { var formContext = executionContext.getFormContext(); formContext.getControl(“description”).setDisabled(false); }, } Step 2: Add this web resource on tab property event TabStateChange and try. (path to go to event tab – Click on tab -> change properties -> event) Output – Hope this helps !
Share Story :
Disable field in Business Process Flow in D365 CE using JavaScript
Use case – Our requirement is to mark field Purchase time Frame disabled in Business process flow on change of disable field(custom field) on opportunity form. Let’s see how we can achieve this Solution – Step 1 – Create web resource with below function- Add header_process before schema name of field. Here schema name of purchase time frame field is purchasetimeframe. And after adding header_process_purchasetimeframe var opportunityCustomization = { //opportunityCustomization.disableField disableField : function(executionContext) { var formContext = executionContext.getFormContext(); var disable = formContext.getAttribute(“cf_disable”).getValue(); if (disable == true) { formContext.getControl(“header_process_purchasetimeframe”).setDisabled(true); } } } Step 2: Add this web resource on form load, on Save and on change of the field. And try Output – Hope this helps !
Share Story :
Retrieve characters/Substring from string in Cloud Flows
In this blog we will see how to retrieve string or characters from string using substring and take method When we want to retrieve character/string from starting index then will use take() method, else will use substring() Let say we want to retrieve first 5 character from string. Eg. – string is Power Automate We will demonstrate this with both the cases. Using Substring Here we are retrieving first 5 characters from string i.e. Power Expression used – substring(‘Power Automate’,0,5) Output – 2. Using take Expression used to retrieve string – take(‘Power Automate’,5) Output – Hope this helps!