Pre-Requisites
- Install Node Js - https://nodejs.org/en/
- Install Power Apps CLI - http://download.microsoft.com/download/D/B/E/DBE69906-B4DA-471C-8960-092AB955C681/powerapps-cli-0.1.51.msi.
1. Create PCF Control
- Create Project Folder
- Navigate to Project Folder
Command – cd <FolderPath>
- Create Project Files in the Project Folder
Once the Project Folder is created next step is to generate project files using the below command.
Command: pac pcf init --namespace <your namespace> --name <your component name> --template <component type>
- Verify Project Files in the Project Folder
Command – npm install
- Update Property Node in Manifest File
- Update Logic in Init and UpdateView Method of Index.ts file
2. Package PCF Control Solution
Once PCF control verified locally lets package into D365 CRM Solution. To package solution we would need ‘Developer Command Prompt for VS 2019’
- Create Solution Folder
- Create Solution Project
Once Solution Folder is created, create Dataverse Project Files in solution folder.
Command: cd <D365SolutionFolder>
Command: pac solution
init --publisher-name <Your Publisher> --publisher-prefix<PublisherPrefix>
- Verify Solution Folder
Dataverse Project Solution File Created Successfully
- Update Dataverse Project File to get Managed/Unmanaged or both the solutions
Command: msbuild /t:build /restore
Once the comment runs successfully,verify the bin folder with CRM Solutions
3. Usage in D365
- Import Solution in D365 CRM
- Create Field and Map the Guid Control
Create Text Field on Entity and update field properties to bind "GuidControl" to the field.
- View the GuidControl on Entity Form
Account Id Field is populated with Guid of the account record.
We can embedd this PCF control to any entity where we need Guid to be mapped to a field.
Happy Learning, Lets SHARE !
No comments:
Post a Comment