Posts

Showing posts from January, 2024

Create a web job and get all active contract records which will be expire in 7 days

Image
Create a web job and get all active contract records which will be expire in 7 days. So for the above scenario we have to  Create a Contract.  For Contract creation you should go for advance in advance settings. Now search contracts and click on result > click on new contract to create a contract. Then a select template popup will be displayed > now  in check box   click on search icon and select service  While creating contract we should provide some mandatory details.  They are contract name , customer , contract start  date   , contract end date  and bill to customer  Now according to our scenario the  contract   start date and  contract   end date difference should come for 7 days and that should be visible in Duration in days where as 7 days. After Creating of contract you should create contract line which is visible left side of the contract which was created.  In contract lines we have some mand...

Activate the Stages of BPF with the help of Plugin

Image
Create Business process flow with stages develop, testing , UAT, create 3 fields with name develop, testing , UAT all are two optionsets, if select the Develop then activate the develop stage, if select UAT then activate the UAT stage using plugin. Step 1: Create an entity > In entity create a field with option set of  develop, testing and UAT > now save and publish the entity. check in CRM entity and option set field are created or not. Step 2:  Create  a BPF > Go to Process and create a BPF in that select the create entity> create three stages name them as  develop, testing and UAT. For these three stages take in data step take the option set field which you created.   Step 3: Now for Stages id in BPF Search "Get BPF stage id"  in google click on this link ==> https://www.cloudfronts.com/blog/dynamics-crm/get-stage-id-of-business-process-flow-stages/  After opening that URL for stage change you will find this url  https://Test130...

Call Action Through JavaScript

Image
 How to Call Action Through JavaScript Ans. Step1: For this fi r st you need to create one action with Two  inputs and O ne output FirstName , LastName  as Inputs and FullName as Output. Next add step as assign value and set FirstName and LastName to FullName   After Creating  a JavaScript to call the action by using XRM toolbox var execute_new_CustomJsAct_Request = { // Parameters entity: { entityType: "effizz_customjs", id: "4f948776-05b6-ee11-9078-6045bd726ef9" }, // entity FirstName: "rtee", // Edm.String //change firstname value to fname LastName: "merr", // Edm.String // change lastname value to lname getMetadata: function () { return { boundParameter: "entity", parameterTypes: { entity: { typeName: "mscrm.effizz_customjs", structuralProperty: 5 }, FirstName: { typeName: "Edm.String", structuralProperty: 1 }, LastName: { typeName: "Edm.String", structuralProperty: 1 } }, op...

4th Create total timespan field in Case, update this field value based on timespan update in child records.

Image
C reate total timespan field in Case, update this field value based on timespan update in child records. Step1: Create Total timespan field in Case entity.   Step2: Create the fetch xml to retrieve the records which having  total time in timespan   Step3: Get the all the records using fetch xml   Step4: Using foreach get the total time in timespan and add the total time using foreach   Step5: Update the that time in case entity using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; using Microsoft.Xrm.Sdk; using Microsoft.Xrm.Sdk.Query; namespace TimeSpanFRR {     public class Totaltime : IPlugin     {         public void Execute(IServiceProvider serviceProvider)             {             IPluginExecutionContext con...