What is Issue?
One of my previous projects had requirement of color picker in MS CRM to provide users flexibility to select any color to can display notifications(using HTML) on their records. But we had no other option than going with html and JavaScript web resources for this.
The Reason-
MS CRM don’t provide any color picker field out-of-box.
Solution-
As I already had a blog written for color picker using web resources and spectrum libraries-Color Picker in MS CRM ?
But it is web resource which needs much efforts to match to field styles in crm.
I have created the custom pcf control (PowerApps Custom Control). This control can be used for the single line text fields.
Depends on browser it appears in supported way-
On Browsers other than IE-
In IE it will appear as –
If you want to use it you form you can download ready custom control from here-ColorPickerSolution.zip
How to use it-
1. Import downloaded solution in CRM-
2. Create single line of Text field in any entity you want and add it on form.
3. when adding to form select field, click on change field property and in controls tab add custom control “ColorPicker”-
4.Save and publish the form.
Now the control is available and ready on form to use.
You can also download the source code from here-ColorPickerSource.zip
To work with source code you need some of the basic setup in your computer-
1. Nodejs installed
2. VS or Visual Studio Code installed
3.Understanding of below commands-
pac pcf init --namespace yourNamespace --name yourControlName --template field
npm install
npm run build
npm start
pac solution init --publisher-name yourPubliserName --publisher-prefix yourPrefix
pac solution add-reference --path "pcfproj folder path"
msbuild /t:restore
msbuild
Hope this will help…
Enjoy Ms CRM!!!
Follow on Facebook- FB: MSCRM16Tech