Monday, September 9, 2024

Documentation Updates Form Microsoft For D365 & Power Platform Developers

 Hi All,


Please find the below Documentation links from Microsoft for MSCRM or Power Platform Developers

System requirements, limits, and configuration values for Power Apps
Improve solution performance, stability and reliability
Define and query hierarchically related data
Work with formula columns
Low-code plug-ins Power Fx (preview)
Visualize hierarchical data with model-driven apps
Using Power Fx with commands
Dataverse long term data retention overview
FAQ for Copilot in model-driven apps
Add Copilot for app users in model-driven apps
Microsoft Dataverse documentation
Create and use dataflows in Power Apps
Import data from Excel and export data to CSV
Importing and exporting data from Dataverse
Sign in to Power Apps
What are model-driven apps in Power Apps?
Customize the command bar using command designer
What is Power Apps?
View table data in Power BI Desktop
List of controls available for model-driven apps
Create a solution
Embed a Power BI report in a model-driven app main form
Use the Power BI report control to add a report (preview)
Manage model-driven app settings in the app designer
Build your first model-driven app
How to run a model-driven app
What’s new in Power Apps?
Use environment variables for Azure Key Vault secrets
Add canvas apps and cloud flows to a solution by default (preview)
PDF viewer control (experimental) in Power Apps
Share a canvas app with guest users
Email address validation for email columns (preview)
Azure integration
Dataverse development tools
Debug JavaScript code for model-driven apps
Asynchronous service
Register a plug-in
Tutorial: Write and register a plug-in
Get started with virtual tables (entities)
Types of columns
Page results using FetchXml
Page results using QueryExpression
Choose finance and operations data in Azure Synapse Link for Dataverse
Client API execution context
Client API form context
Client API grid context
getContentWindow (Client API reference)
isLoaded (Client API reference)
Custom column analyzers for Dataverse Search
Write a listener application for an Azure solution
Form OnSave event (Client API reference) in model-driven apps
PostSave Event
Form OnSave event (Client API reference) in model-driven apps
getFetchXml (Client API reference)
fetch element
Restore deleted records with code (preview)

Tuesday, August 6, 2024

Trigger JavaScript on Business Process Flow Buttons in MSCRM or Dataverse

 ​Implementation Steps:

 
 
2. Click On Solutions
 
3. Create a New Solution
 
4. Create a New JavaScript (in my case its Opportunity.js)

 















5. Copy Paste the Below Code for your JavaScript
 
function onLoad(e) {
    var bpf = e.getFormContext();
    bpf.data.process.addOnPreStageChange(handlePreStage);
};

function handlePreStage(e) {
    var bpf = e.getEventArgs(), entityName = Xrm.Page.data.entity.getEntityName()

    if (bpf.getDirection() === "Previous") {

        bpf.preventDefault();

        var alertStrings = { confirmButtonLabel: "OK", text: "You have Clicked Previous button"};
        var alertOptions = { height: 150, width: 260 };

        Xrm.Navigation.openAlertDialog(alertStrings, alertOptions);

        return;
    }
    if (bpf.getDirection() === "Next") {

        bpf.preventDefault();

        var alertStrings = { confirmButtonLabel: "OK", text: "You have Clicked Next button"};

        var alertOptions = { height: 150, width: 260 };

        Xrm.Navigation.openAlertDialog(alertStrings, alertOptions);

        return;

    }
}

 
6. Now Open Opportunity Table --> Opportunity Form and add an ONLOAD EVENT
 













 
7. Once Done --> Save and Publish
 
 
8. Now Open Opportunity Table --> Open a Record
 
9. Click Business Process Flow --> Click Next
 


 
 








10. Again Click on Business Process Flow --> Click Back Button
 


 
 








That's it :)
 

Thursday, August 1, 2024

How to Set Required and Optional attendees using MSCRM or Dataverse Plugins

Introduction:

In this blog we will see how to Set Required and Optional attendees using MSCRM or Dataverse Plugins

Implementation Steps:


1. Create a Project in VS

2. Create a .cs file and name it as appointment.cs

public class Appointment
{  
    public void Execute(IServiceProvider serviceprovider)
    {

        IPluginExecutionContext executionContext = (IPluginExecutionContext)iServiceProvider.GetService(typeof(IPluginExecutionContext));

        IOrganizationServiceFactory serviceFactory = (IOrganizationServiceFactory)iServiceProvider.GetService(typeof(IOrganizationServiceFactory));

        IOrganizationService service = serviceFactory.CreateOrganizationService(executionContext.UserId); 
     }
}


4. if the entity is appointment then do the following code

Entity entity = (Entity)executionContext.InputParameters["Target"];


5. Create a Party list

ActivityParty party = new ActivityParty
{
PartyId = new EntityReference("systemuser", new Guid("GUID"))
};


6. Update the Required and Optional attendees 

Entity appointment = new Appointment
{
Subject = "Sample Appointment",
RequiredAttendees = new ActivityParty[] { party },
OptionalAttendees = new ActivityParty[] { party }
};



7. Now Update the Appointment

service.Update(appointment);


That's it :)

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

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...