#region Convert Query Expression to FetchXML
var conversionRequest = new QueryExpressionToFetchXmlRequest
{
Query = query
};
var conversionResponse = (QueryExpressionToFetchXmlResponse)this.OrgService.Execute(conversionRequest);
var fetchXml = conversionResponse.FetchXml;
#endregion
Tuesday, July 25, 2023
Convert Query Expression to FetchXML
Sunday, July 23, 2023
Useful Links
SVG Icons
https://uxwing.com - Free SVG Icons
Edit SVG Icon Color
https://deeditor.com/
Get entity name and type code
https://YourOrgName.api.crm9.dynamics.com/api/data/v9.1/EntityDefinitions?$select=LogicalName,ObjectTypeCode
https://www.dynamics365.is/knowledgebase/article/BLG-01019
Or from SQL Query
select Name, ObjectTypeCode from EntityView order by ObjectTypeCode
Jason DateTime Workflow Date Time Utilities
https://github.com/gzoug/CRM-DateTime-Workflow-Utilities
SSL Certificates
https://letsencrypt.org
Experian Address Validation Configuration
https://docs.experianaperture.io/integrations/microsoft-d365-ce-pcf/get-started/form-configuration/
Using CrmSvcutil.exe
Download CrmSdkCoreTools from
https://www.nuget.org/packages/Microsoft.CrmSdk.CoreTools (See the following link for download script to run from command prompt or powershell)
https://learn.microsoft.com/en-us/power-apps/developer/data-platform/download-tools-nuget
Then, Open command prompt, navigate to tools directory and run the following command
CrmSvcUtil.exe ^
/url:[YourOrg]/XRMServices/2011/Organization.svc ^
/out:[Your]SdkTypes.cs ^
/username:[YourUsername] ^
/password:[Password] ^
/namespace:[Namespace] ^
/serviceContextName:[ContextName]
Sunday, July 9, 2023
Open SharePoint Document Location from Dynamics 365 Button using Power FX
The requirement was to open a SharePoint document location associated to a contact record in a separate tab. I was able to open the associated document location in a separate tab by using the following Power Fx code.
Sunday, July 2, 2023
Create a PCF Control
pac pcf init --namespace YourNamespace --name YourComponent --template fieldInstall node.js from the nodejs website, then run following command in the same project directory through command prompt
npm installcode .Wednesday, June 3, 2020
It allowed outbound calls only through a proxy server. So when we tried to connect D365 using the SDK, the following error message was received.
Error Message
One or more errors occurred. => An error occurred while sending the request. => The remote name could not be resolved: 'xxx.crm4.dynamics.com'ERROR REQUESTING Token FROM THE Authentication context ERROR REQUESTING Token FROM THE Authentication contextNeed a non-empty authority Parameter name: AuthorityUnable to connect to CRM: Need a non-empty authority Parameter name: Authority Need a non-empty authority Parameter name: AuthorityUnable to Login to Dynamics CRM Unable to Login to Dynamics CRMOrganizationWebProxyClient is null OrganizationWebProxyClient is nullOrganizationWebProxyClient is null OrganizationWebProxyClient is nullOrganizationWebProxyClient is null OrganizationWebProxyClient is null
Resolution
Put the following in the config file and update the proxy address accordingly.
For connecting to D365 using SDK, see my other blog at CrmServiceClient: Authenticate an Active Directory Account (ADFS) with CRM Online / Dynamics 365.
Saturday, April 18, 2020
CrmServiceClient: Authenticate an Active Directory Account (ADFS) with CRM Online / Dynamics 365
ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls12;
var conString = @"AuthType=OAuth;Username=xxxx@domain.local; Password=xxxxxUrl=https://orgname.crm4.dynamics.com;AppId=2ad88395-b77d-4561-9441-d0e40824f9bc;RedirectUri=app://5d3e90d6-aa8e-48a8-8f2c-58b45cc67315";
CrmServiceClient service = new CrmServiceClient(conString);
if (service.IsReady)
{
//sample request
QueryExpression accounts = new QueryExpression("account")
{
ColumnSet = new ColumnSet(true)
};
service.RetrieveMultiple(accounts);
}
The AppId and RedirectUri hard coded above are for CRM Online and do not change across the environments.
"An unsecured or incorrectly secured fault was received from the other party"