Introduction | Overview | Prerequisites installations | Repo code setup | Deploy | Tools
The Financial Services Repository contains the code-base for the Unified customer profile, Loan onboarding, Onboarding essentials, Banking data model, Small business data model and Property and Casualty data model.
The Unified customer profile provides a 360-degree perspective of the customer in a clear and intuitive way. It helps professionals have a good understanding of their customer’s financial details, important life moments, goals and much more, in order to be able to effectively maintain or deepen their loyalty. It has been tailored to fit the specific needs of professionals operating in the retail banking and the wealth management industries.
- Learn more about the Unified customer profile for retail banking here.
- Learn more about the Unified client profile for wealth management here.
Loan onboarding has been designed to streamline the lending process by leveraging key capabilities such as document and data collection and verification. The application is easily configurable and extensible so that you can customize it to fit the needs of any financial institution looking to provide lending professionals with a unified interface to manage loans. Learn more about Loan onboarding here.
Onboarding essentials provides a set of configurable components to address any onboarding scenarios. You can create an application using a combination of the Onboarding components and out-of-the-box platform components. Learn more about Onboarding essentials here.
Banking data model provides the foundation for operational capabilities across retail banking and wealth management. Learn more about retail banking data model here
Small business data model extends the Microsoft Cloud for Financial Services data model foundation to represent individuals and allows linking small businesses to individual financial holdings. Learn more about small business data model here
Property and Casualty data model captures new attributes including policy and coverage information, claims, insurance providers and producers. Learn more about property and casualty data model here
Introduction | Overview | Prerequisites installations | Repo code setup | Deploy | Tools
This guide walks you through the entire process of building and deploying any of the solutions within the Financial Services Experiences, such as the Unified customer profile, Loan onboarding or Onboarding essentials. It introduces the list of essential prerequisites, a set of detailed code setup instructions, a deployment guidance into the Power Platform environment, and an overview of the tools at your disposal. To install the solution, you can either carefully follow the instructions outlined in the following sections or use InstallTools.cmd
in Tools.
Note: To guarantee a smooth build process, you may need to have a memory of 8GB or more to avoid running out of memory on build. Consider using Windows PowerShell of version 5.1 as needed throughout setup steps.
Introduction | Overview | Prerequisites installations | Repo code setup | Deploy | Tools
Install NVM to use the specified Node.js version (18.14.1).
- Install latest nvm for Windows.
- Run
nvm install 18.14.1
and thennvm use 18.14.1
on Windows PowerShell. - Install pnpm using Windows PowerShell with the
npm install -g pnpm@8.6.2
command. - Install .NET for Windows.
- Install Visual Studio 2022.
- Add .NET (C:\Program Files\dotnet) to the System Path using this guide.
- Install Visual Studio Code.
- Install the PAC PowerApps CLI.
- Install Power Platform Tools extension for Visual Studio.
- Install the package deployment module according to the instructions here, and make sure to run the command
Install-Module Microsoft.Xrm.Tooling.CrmConnector.PowerShell
(use Administrator Windows PowerShell). You can use the instructions in this guide to change the registry and allow file path longer then 260 characters. - Install git for Windows.
- Allow git to use long file paths by running the following command:
git config --global core.longpaths true
.
To install the CRM SDK tools, you can manually the specified steps, or run the CrmSdk Tools
PowerShell script installer located in $RepoRoot> ./Crm.Sdk.Core.Installer.ps1 after cloning the repo.
- Download nuget for Windows.
- Download SDK Tools.
- Use nuget to install the downloaded package, you can follow the instructions outlined in the official documentation.
- Save the file to your user's AppData folder, that is, C:\Users\<alias>\AppData\Local\microsoft.crmsdk.coretools.9.1.0.64. (If the AppData folder is not visible, change the folder view settings to display hidden files).
- Add the saved file to the User Path using this guide.
Introduction | Overview | Prerequisites installations | Repo code setup | Deploy | Tools
- Clone the repository.
- Make sure to have plug-ins signed before building the solution in this stage. To achieve that, you can follow the instructions highlighted in signing and registering plug-ins section.
- Run
pnpm install
in\frontend
directory to install all dependent node libraries. If you encountered an error, runSet-ExecutionPolicy -Scope Process -ExecutionPolicy Bypass
and try again. - Run
pnpm build-libs
in\frontend
directory to build all dependent node libraries. - Open
Modules\FSI.sln
in Visual Studio, and build the solution. If the build fails, go to the next step. - Open a PowerShell terminal, go to
\Modules
and rundotnet build
. The build should complete without any errors.
Note: It is important that you follow the setup steps in the following sections, as without them, the build process won't work properly and you might spend quite a lot of time in debugging issues.
Follow this section when adding a new solution to the code. If the solution already exists, skip to the Export solution or data section.
There are two name convention in the setup that will be shorten for readability.
module
: The module name is the package you are working on.fullName
: The concatenation of the group and solution in the<GroupName><solutionName>
format. Here, group name is the name of the group in which you are working. For example, if a group name is FSI and a solution name is BankingDataModel, the full name is FSIBankingDataModel.
- modules
- module1
- anchor solution for module 1
- package project for module 1
- solution 1
- solution 2
- ...
- module2
- anchor solution for module 2
- package project for module 2
- solution 1
- solution 2
- module1
- Create a new folder under
modules
, with the name<module>
. - Open the solution (
fsinew\Modules\FSI.sln
) in Visual Studio and create a new solution folder with the name<module>
.
The anchor solution is the indicator that all the solutions in a package were deployed at the client.
- Add a new project of type
Class Library (.NET Framework)
with the name<fullname>Anchor
under the<module>
folder. In this case,solutionName
ismodule
, sofullname
is<Groupname><module>
and the new project name is<Groupname><module>Anchor
. Note that the default project path is incorrect. Make sure the project is created under the<module>
folder. - In Visual Studio Code, perform the following tasks:
- Remove the folder
Properties
. - Delete
Class1.cs
.
- Remove the folder
- Copy the contents of
FSIBaseSolution.csproj
from the<projectDirectory>/templates
to the newly createdcsproj
file and update the ModuleName attribute with<module>
. - Go to
build\include
and add a"<fullname>Anchor."
entry to thexrmcopyexcludes.txt
file (note the period at the end). - Create an Anchor solution (if one does not exist). Create an empty solution in your Dynamics 365 environment with the following naming convention:
<module>Anchor
. - Go to
exports\solutions
and open theSolutionMappings.json
file.- This file describes the different projects and the corresponding solutions.
ProjectName
is the name of the solution in the repo.SolutionName
is the display name of the solution ( in the Dynamics 365 environment) you want to add to the repo. - Add the new solution in
SolutionMappings.json
by following the pattern in the file.
- This file describes the different projects and the corresponding solutions.
The package project combines all the other projects, such as solution, plugin, and PCF, into one package for shipping to the client and in the local deployment for testing. To set up your package project, follow these steps:
- Go to Visual Studio and add a new project under the already created module. Use the
power platform package deployment project
to get this package type. Naming convention is<module>.Package
. Remember to make sure the project is created under the module directory. If you don't have the Power Platform package project, you can copy from<projectDirectory>/templates/SampleProject.package
. - Copy the contents of the
importConfig.xml
file content from<projectDirectory>/templates/SampleProject.package
and updateimportConfig.xml
of the newly created package file (\Modules\<module>\<module>.Package\PkgFolder\ImportConfig.xml
). Update theconfigsolutionfile
attributes accordingly. - Rename
pkgFolder
to<module>
. - In
PackageTemplate.cs
, override the return value ofGetImportPackageDataFolderName
with<module>
. - Copy the contents of the
BaseSolution.Package.csproj
file from<projectDirectory>/templates
to<module>.Package\<module>.Package.csproj
.- In
csproj
, find and replace all references toFSIBaseSolution
with theFSI<module>
. - Update the
ModuleName
attribute with current<module>
. - Delete to
properties
folder andpackages.config
file.
- In
- Under
\Modules\<module>\<module>.Package\<module>
create aConfigData
folder and copy into it the placeholder filereadme.md
from<projectDirectory>/templates
. This folder can storedata.xml
files that will be unpacked there. - Copy the
PackageExtra
folder from<projectDirectory>/templates/SampleProject.package
and paste it under<module>.Package
.
- Go to the
exports\data
folder. - Create a schema XML file and add it to the schema folder.
- The Schema file is created using the configuration migration tool. You can find more details in
readme.md
under theexports\data
folder. - Use the schema file to download the data from your solution and paste it in the data folder.
- The Schema file is created using the configuration migration tool. You can find more details in
If you want to add a new solution with the name <SolutionName>
available in your Dynamics 365 environment, follow these steps:
- Add a new project of type
Class Library (.NET Framework)
with the name<fullName>
under the relevant<module>
folder (package). Note that the default project path is incorrect. Make sure the project is created under the<module>
folder. - Project Cleanup (Back to VS Code):
- Remove the folder
Properties
. - Delete
Class1.cs
.
- Remove the folder
- Copy the csproj content from the
template project
to the newly createdcsproj
file and update the ModuleName attribute with<module>
. - Go to
build\include
and add a"<fullName>."
entry to thexrmcopyexcludes.txt
file (note the period at the end). - Go to the
exports\solutions
folder and open theSolutionMappings.json
file.- This file describes the different projects and the corresponding solutions.
ProjectName
is the name of the solution in the repo.SolutionName
is the display name of the solution (in the Dynamics 365 environment) you want to add to the repo. - Add the new solution in
SolutionMappings.json
by following the pattern in the file. For information about the initial export, refer to this section.
- This file describes the different projects and the corresponding solutions.
Plug-ins must be signed before the deployment stage. Otherwise, the deployment will fail. Follow the steps down below to sign the plug-in:
- To sign the plugins, you need to create a key pair using the Strong Name tool.
- Start the tool using Visual Studio Developer Command Prompt, go to
build\config
folder, and follow the steps in this documentation to create a key pair, call it "key.snk". - Extract the public key from the key pair and copy it to a separate file as declared in the documentation in step 2, you'll need the public.snk file to extract the public key token.
- Run
sn -tp public.snk
on Visual Studio Developer Command Prompt and save the extracted public key token. - Follow the steps here to sign the assemblies (.Plugins.csproj files found under the Modules directory) using Visual Studio. The strong name key file path should point to your key pair file, i.e.,
$(MSBuildThisFileDirectory)\build\config\key.snk
. - Using Visual Studio Code, search for "PublicKeyToken=null", and replace all results with the public key token extracted previously in step 4, i.e, PublicKeyToken=<extracted_public_key_token>.
For plug-ins registration, you can follow the steps in this documentation.
Because Power Apps component framework (PCF) projects are special Javascript projects, they have a different build cycle. To create PCF projects, follow these instructions:
- Go to the
internal\src
folder` - Create a new folder for your combined PCF solution. This solution can host one or more PCFs, and it is important not to create many PCFs solutions, as this can decrease performance and requires a lot of maintenance on dependency management . Follow the naming convention
<ModuleName>.PCF
for the folder. - Create an
src
folder and asolutions
folder inside the folder you created in the previous step. - In the
solutions
folder, create a folder with the solution's name considering the naming conventions specified in the naming and solutions note below. - In the folder created in the previous step, create the PCF solution. For more information on creating the solution, see this page.
- In the
src
folder, create a folder with the name of the PCF you are creating. - In the folder created in the previous step, create the PCF component. For more information on creating the component, see this page.
Note about Naming and Solutions:
You must follow the recommended folder structure for the PCF, as any deviations might cause compile-time or run-time failures. As far as the naming and structure are concerned, we recommend that you have a single PCF folder for an industry vertical, such as FSI.PCF or HealthCare.PCF. This approach might cause complexity when working on common solutions or on several offering in similar verticals. Therefore, you must follow the guidelines for creating the folder structure.
In most cases, you need to create a new PCF under the <PCF folder>\src
and add it to an existing PCF solution.
Post Building: After successfully building the PCF solution, you'll need to deploy it to an environment and create a solution project, as mentioned in step 4 of the Setup guide. The solution is packed with the rest of your customizations and contains the PCFs.
As part of creating and working with plug-ins, you need to create a class library project, similar to a solution project, and update the csproj
to mimic the template.
Javascript or typescript web resources are built in the frontend/web-resources/WebResources
folder. To work with web resources, follow these steps:
- Create the Javascript web resource in the required solution. The name must have the
.js
extension. - Export the solution for the metadata.
- Create the same folder structure for the solution under
frontend/web-resources/WebResources
folder and add ats
orjs
file with the same name in the newly created folder. - In the solution folder, add
packageMap.xml
if one doesn't already exist. Add the following rows to thepackageMap.xml
:Note: The<?xml version="1.0" encoding="utf-8"?> <Mapping> <FileToPath map="WebResources\**\*.js" to="..\..\..\target\WebResources\<Parent folder>\<current folder>\**" /> <FileToPath map="WebResources\*.js" to="..\..\..\target\WebResources\<Parent folder>\<current folder>\**" /> </Mapping>
<xml>
and<Mapping>
tags are only required if this is a new file. If the file already exists, just add the<FileToPath>
tags in the right location. - In the solution
.csproj
file, add<SolutionMapFile>packageMap.xml</SolutionMapFile>
toPropertyGroup
. - Run the
InstallTool only_webresource
or install and run the web resource package (npm i && npm run build
in thefrontend/web-resources/WebResources
folder).
Unit test projects can be added to test plugins and run in the pipeline
to create a unit test project create a folder under Modules/tests
and add a .csproj
file with the following template:
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net42</TargetFramework>
<RootNamespace>{{unit test project name}}</RootNamespace>
<AssemblyName>{{unit test project name}}</AssemblyName>
<DynamicsProjectType>Testing</DynamicsProjectType>
</PropertyGroup>
<ProjectReference Include="{{unit test target project}}" />
</ItemGroup>
</Project>
Note that the FakeXrmEasy
is taken locally since it is an edited version of the fakeXrmEasy
package.
Introduction | Overview | Prerequisites installations | Repo code setup | Deploy | Tools
- Download the NuGet package and install it using NuGet, you can follow the instructions outlined in the official documentation for installation.
- Open a PowerShell terminal and go to
[ExtractedLocation]\tools
. - Run
Set-ExecutionPolicy -Scope Process -ExecutionPolicy Bypass
to bypass MS policies. - Run the install file:
.\RegisterXRMPackageDeployment.ps1
. - Before deploying the model, make sure to change the maximum file size limit on the Power Platform environment where you want to deploy the model. Follow the instructions in this documentation.
- If you wish to have your Power Platform environment localized, you can import the compressed file supporting your preferred language from
$RepoRoot\Modules\UnifiedCustomerProfile\Localization
into your environment. - Consider tracking the right order through the deployment process, the following table illustrates the dependencies between the packages in this repository, dependencies must be deployed first:
Solution | Solution Dependencies |
---|---|
Banking data model | - |
Document intelligence data model | - |
Onboarding essentials | Document intelligence data model |
Unified customer profile for retail banking | Banking data model |
Unified client profile for wealth management | Banking data model |
Loan onboarding | Onboarding essentials |
Small business data model | - |
Property and Casualty data model | - |
Currently, no automated import tool is available. However, to use the PowerShell tool to import package, you can follow the instructions outlined in the official documentation, and to use the Package Deployer tool, you should consider this version mentioned previously in step 1 above, instead of the version attached in the documentation.
PackageDeployer is a deploy tool for the solutions. The build process compresses the packages into zip files that can be found in drop\Debug\AnyCPU\PDPackages
. You can use the package deployer to deploy an entire package to your environment, eliminating the need to import solutions one-by-one followed by the data and publish customizations.
We've added a tool to help with the deployment. You can find the tool in tools\PackageDeployHelper
. The folder contains a detailed readme file with troubleshooting steps that can help if you are using the package deployer without the helper tool.
To enable multiple languages on your Power Platform environment, follow these steps:
-
Select preferred language: When creating your environment, choose the desired language to enable localization right from the start. Or you can enable/disable available languages in the environment settings.
-
Import localization files:
- Navigate to
./Localization/your-language-code/your-solution
. - Unzip the selected folder (This should yield two files:
[Content_Types].xml
andcrmTranslation.xml
). - Open
crmTranslation.xml
in an Excel app. - Select the first tab (information tab) and add your organization ID, which you can find here.
- Save your changes and rezip
crmTranslation.xml
file with[Content_Types].xml
as it was before.
- Navigate to
-
Import translations: To import the translations into your environment, follow these steps, which will help you configure and import localization files for your solution in your Power Platform environment.
Introduction | Overview | Prerequisites installations | Repo code setup | Deploy | Tools
You can use ExportTool.cmd
to export the solution and data or manually export them.
You can use the file to export either data or solutions (both managed and unmanaged) from an org to (root)\exports folder. As a prerequisite to export solutions, you must have downloaded the Power Apps CLI from https://aka.ms/PowerAppsCLI.
The following parameters are required for export. You need to follow these steps:
- ExportType: Specify
'Solution'
or'Data'
. The rest of the parameters are based on the first one. For example,.\ExportTool.cmd 'Solution'
. - Follow the specified instructions. When prompted, enter the project name as defined in
solutionmapping.json
orfilemapping.json
(for Solution and Data respectively):- (Optional Parameter;
'Solution'
) Version: The version number, or leave empty for latest. - (Optional Parameter;
'Solution'
) URL: The url for your environment, or leave empty to use the default URL from the logged in PAC profile. - (Optional Parameter;
'Data'
): The organization name, or leave empty to use the default organization name from the logged in PAC profile. When the solution export is complete, the managed and unmanaged solution zip files are placed underexports\solutions\<ProjectName>
.
- (Optional Parameter;
You can use InstallTool.cmd
to install and build the front-end modules.
To run the installation tool, run the ./InstallTool.cmd
command in PowerShell.
This project may contain trademarks or logos for projects, products, or services. Authorized use of Microsoft trademarks or logos is subject to and must follow Microsoft's Trademark & Brand Guidelines. Use of Microsoft trademarks or logos in modified versions of this project must not cause confusion or imply Microsoft sponsorship. Any use of third-party trademarks or logos are subject to those third-party's policies.