We provide complete sharepoint solution like installation,development,deployment and configuration using tools like spfx,sharepoint designer,powershell and ms flow
Monday, 25 September 2023
PCF Control development
PCF Control Schema
Control TAG
Attributes of control tags
namespace: Provided in the “pac” command earlier.
constructor: Provided in the “pac” command earlier.
version: change the versioning if needed; else, we can keep it to default.
display-name-key: This will be the display name with no spaces for custom control.
description-key: This description will be shown in D365 for custom control.
control-type: We will keep the default value
Property TAG
Attributes of property tags
name: Provide the name that will be used for custom control.
display-name-key: Provide the display name with no spaces for custom control.
description-key: This description will be shown in D365 for custom control.
of-type: If we are using a single datatype, then there are some supported datatype that can be used for the of-type attribute.
Valid values are:
TwoOptions
Whole.None
Currency
DateAndTime.DateAndTime
DateAndTime.DateOnly
SingleLine.Email
SingleLine.Phone
SingleLine.Text
SingleLine.TextArea
SingleLine.Ticker
SingleLine.URL
Decimal
Enum
FP
Multiple
Optionset
of-type-group: if we are building control that will support multiple data-type, then we need to use the of-type-group attribute.
Let us define a type-group:
<type-group name=”line”>
<type>SingleLine.Email</type>
<type>SingleLine.Phone</type>
<type>SingleLine.Text</type>
<type>SingleLine.URL</type>
</type-group>
DataSet TAG
Attributes of data-set tags
name: Provide the name of the data setused to get the value in a custom control.
display-name-key: Provide the display name with no spaces that will be set while importing in App.
description-key: This description will be shown in D365 for custom control.
Resources TAG
Subtags of Resources tags
code: Provide the relative path for typescript file which contains code for custom control
css – Provide the CSS files that need to be added.
resx – Provide the file path that contains static string contents that are needed for the control.
img – Provide the images that are needed in the project.
Thursday, 21 September 2023
How to get other controls value in PCF Control
Wednesday, 20 September 2023
error 'context' is defined but never used no-unused-vars
When we run npm run build or npm start command and getting below error
[4:53:53 PM] [start] Initializing...
[4:53:53 PM] [start] Validating manifest...
[4:53:53 PM] [start] Validating control...
[4:53:55 PM] [start] Generating manifest types...
[4:53:55 PM] [start] Generating design types...
[4:53:55 PM] [start] Running ESLint...
[4:53:59 PM] [start] Failed:
[pcf-1065] [Error] ESLint validation error:
43:23 error 'context' is defined but never used no-unused-vars
Solution: Then ".eslintrc.json" file and add the below configuration under rules.
React version not specified in eslint-plugin-react settings. See https://github.com/jsx-eslint/eslint-plugin-react#configuration
When we build the PCF project and receive below warning
Error:
Warning: React version not specified in eslint-plugin-react settings. See https://github.com/jsx-eslint/eslint-plugin-react#configuration .
[4:47:40 PM] [start] Compiling and bundling control...
Solution : Open the ".eslintrc.json" and add below configuration
"settings": {
"react": {
"version": "detect"
}
}
The OutputPath property is not set for project PCFPackage.cdsproj
When we run the below command in VS Developer command
"msbuild /t:build /restore" or "msbuild /p:configuration=Release"
and get the below error
C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\MSBuild\15.0\bin\Microsoft.Common.CurrentVersion.targets(780,5): error : The OutputPath property is not set for project 'PCFPackage.cdsproj'. Please check to make sure that you have specified a valid combination of Configuration and Platform for this project. Configuration='Debug' Platform='AnyCPU'. You may be seeing this message because you are trying to build a project without a solution file, and have specified a non-default Configuration or Platform that doesn't exist for this project. [C:\Users\user\Downloads\PCFPackage\PCFPackage.cdsproj]
Solution: Add below configuration in .cdsproj file
<PropertyGroup Condition=" '$(Configuration)' == 'Debug' ">
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)' == 'Release' ">
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>