Implementing Custom Actions in Dynamics 365 CRM

Implementing Custom Actions in Dynamics 365 CRM


Scenario: Loan Application Approval Process (Banking CRM)


Business Requirement:

When a loan application is submitted and reviewed, a Loan Officer should be able to approve it using a single click (from a model-driven app, portal, or Power Automate)

The approval process should be as below:

  • Validate that all required documents are uploaded
  • Create a Loan Record (from the Loan Application)
  • Send approval notification to the customer
  • Update application status to “Approved”

This Action should be reusable across:

  • Plugin
  • Power Automate
  • Web API (external system)
  • JavaScript (custom button)


Step 1: Create the Custom Action

  • Go to Power AppsSolutions
  • Click New → Automation → Process
  • Choose:

Category: Action

Entity: Loan Application

Name: ApproveLoanApplication

  • Click Create


Step 2: Add Input Parameters

Inside the Action:

  • Click + Add Input
  • Add:

LoanApplicationId → EntityReference → Entity: Loan Application

Approved By → String (name of officer or GUID if needed)


Step 3: Add Steps (Workflow Logic)

1. Validate Documents:

  • All required documents (like ID Proof, Income Proof) must be uploaded (you may use child entity count check or plugin).

2. Create Loan Record:

Create a new record in Loan entity:

  • Set Customer = From Application
  • Amount = From Application
  • Term = From Application
  • Application ID = Lookup to Loan Application

3. Send Notification to Customer:

Create an Email:

  • To: Customer’s Email
  • Subject: Loan Approved
  • Body: “Dear Vamshi, your loan has been approved…”

4. Update Loan Application:

  • Set Status = Approved
  • Set Approval Date = Now
  • Set ApprovedBy = Input parameter

Step 4: Save and Activate the Action

  • Click Save
  • Click Activate

Now your ApproveLoanApplication action is ready to use.


Step 5: Call the Action from Anywhere(Plugins, Power Automate, JavaScript, External Web API)

1. Plugin:

Article content

2. Power Automate:

  • Use “Perform a bound action”
  • Select Entity: Loan Application
  • Action Name: ApproveLoanApplication
  • Provide input parameters

3. JavaScript:

Article content


A better and up to date method is to use Custom APIs.

Myo Min Tun

Microsoft Dynamics CRM-Power Platform Developer | Azure Cloud and AWS Cloud | Available for FULL-TIME W-2 Employment | WILLING TO RELOCATE

3mo

Interesting

Bhavanisankar Vanjarapu

Power platform | Dynamics 365 | Power BI | CRM Solutions | Azure Data Engineering | Python | PL-900 Certified

3mo

Thanks for sharing

To view or add a comment, sign in

Others also viewed

Explore topics