Monday, July 29, 2024

Plugin vs Workflow Execution Order – Which runs first?

Introduction:


In this blog we will see how to trigger Synchronous Plugin before Synchronous Workflow.


Implementation Steps:


1. Open Plugin Registration tool


2. Login with your credentials


3. Select your environment


4. Consider i want my account sync plugin to trigger first


5. Expand your assembly


6. Expand your Plugin Code


7. Open the Step (Which is of Sync)


8. Now Change the EXECUTION ORDER to 0



That's it :)

Thursday, June 27, 2024

ERROR While Building PCF : The term 'msbuild' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again.

 Hi All,

 

Issue while running : [msbuild /t:build /restore]

 

"The term 'msbuild' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path
was included, verify that the path is correct and try again."

 

Resolution:

 

If you are using Visual Studio 2019 or 2017 follow below Steps

 

1. Navigate to My Computer

 

2. Right Click on my Computer and Click Properties (or) Click Settings and Search for Environment 

rampprakash_0-1719489065305.png

 

 

3. Edit the System environment

 

4. Select Path

 

rampprakash_1-1719489140922.png

 

5. And Click EDIT

 

6. Click New

 

if you are using VS 2019 use below

 

%ProgramFiles(x86)%\Microsoft Visual Studio\2019\Community\MSBuild\Current\Bin

 

if you are using VS 2017 use below

 

%ProgramFiles(x86)%\Microsoft Visual Studio\2017\Enterprise\MSBuild\15.0\Bin

 

7. That's it.

Now Close and Open the Same to make it 

msbuild /t:build /restore




If you are using VS 2022

 

Now Search for CMD

 

rampprakash_2-1719489370811.png

 

 

Directly use the Command 

 

msbuild /t:build /restore

 

to make it work.

 

That's it :slightly_smiling_face:

Tuesday, June 25, 2024

How to Call Action from Plugins in Dataverse or MSCRM

Introduction:


In this Blog we will see how to call action from Plugins in Dataverse or MSCRM


Implementation Steps:

 

1. Create a Action ( find my blog here on how to create Action)

 

2. I have Created an action without any input Parameters

 

rampprakash_0-1719317946713.png

 

 

 

3. Once the Action is Created, Navigate to Settings --> Customization --> Customize the System --> Click Web Resource

 

rampprakash_1-1719317946735.png

 

4. Click New and Create a New Web Resource with Below Code


// Calling the Action
OrganizationRequest req = new OrganizationRequest("new_AccountAction");
req["Target"] = new EntityReference("account", account.Id);
OrganizationResponse response = service.Execute(req);

 

 

Now you can call the above code from any plugin to trigger the action

How to Call Action from WebResource using Web Api

Introduction:


In this blog we will see how to call action from WebResource using WebApi in MSCRM or Dataverse


Implementation Steps:

 

1. Create a Action ( find my blog here on how to create Action)

 

2. I have Created an action without any input Parameters

 

rampprakash_4-1719317688631.png

 

 

3. Once the Action is Created, Navigate to Settings --> Customization --> Customize the System --> Click Web Resource

 

rampprakash_3-1719316587746.png

4. Click New and Create a New Web Resource with Below Code

 

 

var req = {};
req.getMetadata = function () {
    return {
        boundParameter: null,
        operationType: 0,
        operationName: "new_AccountAction"
    };
};
 
Xrm.WebApi.online.execute(req).then( 
    function (data) { 
        var e = data; 
        debugger; 
    }, 
    function (error) { 
        debugger; 
        var errMsg = error.message; 
    }
);

 

5. That's it.

 

Now Call this function from OnLoad Or OnSave or OnChange from Account Level.

Wednesday, June 12, 2024

Importing solution error : Default OptionSet value has to be one of the option values. InnerException: System.ArgumentOutOfRangeException: Specified argument was out of the range of valid values.Parameter name: Default picklist value has to be one of the option values.

 While trying to import solution with OptionSet Value am getting below error


Default OptionSet value has to be one of the option values. InnerException: System.ArgumentOutOfRangeException: Specified argument was out of the range of valid values.Parameter name: Default picklist value has to be one of the option values.

How i Over Come this and what are the Options i cross checked here to fix this Issue

 

Steps i Crosschecked :

 

1. Make sure the Publisher is same

2. Make Sure the Optionset Text and Value Same

3. Make Sure the Option Set Data type is same

If all are good and Still getting an error?

 

I directly deleted from the destination Environment and imported the solution to make it work.

Thursday, May 23, 2024

Is your Asynchronous plugin or Workflow not running in Dataverse?

Introduction:


In this blog we will see how to enable Asynchronous Operation in MSCRM or Dataverse Environments.


Implementation Steps:

 

1. Navigate to https://admin.powerplatform.microsoft.com/

 

2. Click on Environments

 

rampprakash_0-1716464005067.png

 

 

3. Open the Environment where you want to run your plugins or workflows

 

4. Click Edit 

 

rampprakash_1-1716464055515.png

 

5. It will prompt a PopUp --> Scroll to the Last

rampprakash_2-1716464166239.png

 

 

6. Enable Administration Model and Enable Background Operations

 

That's it :slightly_smiling_face:

Friday, May 3, 2024

How to Run Microsoft Flow for Every one Month

Introduction:


In this Blog we will see how to Run Microsoft Flow for Every one Month.


Implementation Steps:

 

1. Navigate to https://make.powerautomate.com

 

2. Click My Flows at the Left Side

 

rampprakash_0-1714736875580.png

 

3. Click New Flows and Select Scheduled Cloud Flows

 

rampprakash_1-1714736970375.png

 

4. Once Selected it will prompt a page there enter the Name of the Flow and Select the Date on when to trigger and Select the Repeat every 1 MONTH

rampprakash_2-1714737550885.png

 

That's it :slightly_smiling_face:

 

Day 11 - Customizing Option Sets Dropdown Fields with JavaScript

  In this Blog, we will see how to Customizing Option Sets Dropdown Fields with JavaScript label1 = formContext.getAttribute( "bosch_op...