Posts

Showing posts from May, 2023

Create Folder On Share Point by using Power Automate In Dynamics CRM

Image
  1-Flow trigger When contact is created 2-Declare two variables one for storing SharePoint site URL and the other one is for the Sotring Entity name. 3-Use SharePoint Connector and take create a new folder action. In the Site address and Library pass the variables and in the folder, the path gives the folder name, whatever you give the path will create a folder accordingly. (here I have given FULL NAME_GUID ) In replace expression I have replaced Guid '-' with ' '.( replace(toUpper(triggerOutputs()?[ 'body/contactid' ]), '-' , '' ) ) 4-After Creating the folder we need to retrieve the parent site document location for the contact for creating a new document location. 5-creating new document location.in this, we provide the site name whatever you want and In the  Relative URL pass the folder path the same as we have given for folder creation action in step no 3. In regarding(contacts) pass contact GUID and  Parent Site or Location (Document Locat

Duplicate Detection Plugin code for Microsoft dynamics CRM

 using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; using Microsoft.Xrm.Sdk; using System.ServiceModel; using Microsoft.Xrm.Sdk.Query; namespace MyPlugins {     public class DuplicateCheck : IPlugin     {         public void Execute(IServiceProvider serviceProvider)         {             // Extract the tracing service for use in debugging sandboxed plug-ins.               // If you are not registering the plug-in in the sandbox, then you do               // not have to add any tracing service related code.               ITracingService tracingService =                 (ITracingService)serviceProvider.GetService(typeof(ITracingService));             // Obtain the execution context from the service provider.               IPluginExecutionContext context = (IPluginExecutionContext)                 serviceProvider.GetService(typeof(IPluginExecutionContext));             // Obtain the organization service reference which you w

Revenue Round Off Plugin code for Microsoft dynamics CRM

 using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; using Microsoft.Xrm.Sdk; using System.ServiceModel; namespace MyPlugins {     public class RevenueRoundoff : IPlugin     {         public void Execute(IServiceProvider serviceProvider)         {             // Extract the tracing service for use in debugging sandboxed plug-ins.               // If you are not registering the plug-in in the sandbox, then you do               // not have to add any tracing service related code.               ITracingService tracingService =                 (ITracingService)serviceProvider.GetService(typeof(ITracingService));             // Obtain the execution context from the service provider.               IPluginExecutionContext context = (IPluginExecutionContext)                 serviceProvider.GetService(typeof(IPluginExecutionContext));             // Obtain the organization service reference which you will need for               //

Create a Task plugin in MS Dynamics CRM

 using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; using Microsoft.Xrm.Sdk; using System.ServiceModel; namespace MyPlugins {     public class TaskCreate : IPlugin     {         public void Execute(IServiceProvider serviceProvider)         {             // Extract the tracing service for use in debugging sandboxed plug-ins.               // If you are not registering the plug-in in the sandbox, then you do               // not have to add any tracing service related code.               ITracingService tracingService =                 (ITracingService)serviceProvider.GetService(typeof(ITracingService));             // Obtain the execution context from the service provider.               IPluginExecutionContext context = (IPluginExecutionContext)                 serviceProvider.GetService(typeof(IPluginExecutionContext));             // Obtain the organization service reference which you will need for               // web s

Power Automate - Update Child record when parent record is updated by using power automate in MS Dynamics CRM

Image
Power Automate - Update Child record when a parent record is updated by using power automate in                                                                  MS Dynamics CRM                                                                     Trigger of the flow List Contacts Related to the Account Update Contacts On the Contacts entity map fields on the contact form from the account which field need to be updated in the account form, here I have mapped the address field from account to contact when the address on the Account is updated then the address on the Contact will also be updated.   

Upload Email Attachments To share point and Delete from Dynamics CRM Through Power Automate Flow - Power Automate

Image
 Upload Email Attachments To share point and Delete from dynamics CRM Through Power Automate Set Flow Triger Point and store share point site Url in variable List Cases having attachments in Emails <fetch version='1.0' output-format='xml-platform' mapping='logical' distinct='true'>   <entity name='incident'>     <attribute name='title' />     <attribute name='ticketnumber' />     <attribute name='createdon' />     <attribute name='incidentid' />     <attribute name='caseorigincode' />     <order attribute='title' descending='false' />     <link-entity name='activitypointer' from='regardingobjectid' to='incidentid' link-type='inner' alias='aa'>       <link-entity name='activitymimeattachment' from='objectid' to='activityid' link-type='inner' alias='ab' />

Create folder on share point Microsoft dynamics CRM with document Location By Power Automate

Image
   1-Set Trigger Point According To Requirement         2-Set Your Share Point Site In Variable       3-Use Share Point Connector & take action CREATE FILE . In this Block Assign share point then select folder path ,  declare file format and file name  Both are temporary. (In this block , we can set folder name according to requirement)         4-Delete Temp.txt File From Previous Stage In this block we are deleting temp file which is created earlier After deleting file A folder With Ticket Number Will be Created on share point.  5-List Document Location 6-Create New Location In Regarding it will be (regarding (incident)) and in Relative Url it should be same as defined in step 3 after main path. We can Use This Flow For Creating Folder For Any Entity In Dynamics and we can set Folder name what ever we want. Over All Flow Structure                 Requirement: Share point Integration with individual folder structure format not hierarchal structure from Accoun t.  

Create Folder On Share Point With Case Number In Dynamics CRM By Power Automate

Image
  1-Set Trigger Point According To Requirement         2-Set Your Share Point Site In Variable       3-Use Share Point Connector & take action CREATE FILE . In this Block Assign share point then select folder path ,  declare file format and file name  Both are temporary. (In this block , we can set folder name according to requirement)         4-Delete Temp.txt File From Previous Stage In this block we are deleting temp file which is created earlier After deleting file A folder With Ticket Number Will be Created on share point.  We can Use This Flow For Creating Folder For Any Entity In Dynamics and we can set Folder name what ever we want.                Over All Flow Structure Requirement: Share point Integration with individual folder structure format not hierarchal structure from Account.  

Show/Hide Tab , Section and fields in Dynamics CRM

var tabName = "your_tab_name" ; // Replace with the actual name of the tab var tab = formContext . ui . tabs . get ( tabName ); if ( tab != null ) {   // To show the tab   tab . setVisible ( true );   // To hide the tab   // tab.setVisible(false); } In this code, formContext represents the context of the current form. You should have access to it within the appropriate event handler or function where you want to show or hide the tab. Again, make sure to replace "your_tab_name" with the actual name of the tab you want to show or hide. // Get the section object by its name var sectionName = "your_section_name" ; // Replace with the actual name of the section var section = formContext . ui . tabs . get ( tabName ). sections . get ( sectionName ); if ( section != null ) {   // To show the section   section . setVisible ( true );   // To hide the section   // section.setVisible(false); }   In this code, you first specify the name of the section yo