“Invalid Argument” Error while setting properties in SLA

Ajit Patra

Recently, we were working on SLA. We provided necessary conditions in Applicable When and Success Criteria sections. In Success Actions section, we wanted to update Customer Record(OOB entity “contact” renamed) and clicked on Set properties as shown below:

SetProperties

On click of it, we got “Invalid Argument” error as shown:

Invalid_Error

To fix this issue, we copied the URL of this window and decoded it. We got the root cause of this issue by looking at the decoded URL. The decoded URL contained the following piece of information:

Error Details: Wrong type of attribute UI properties passed to the attribute “custom_field”.&RequestUri=/SFA/Workflow/entityform.aspx?entityFullName=contact.regardingobjectid&entityname=contact&mode=1&primaryentity=task&readonlymode=true&relatedattributename=regardingobjectid&stepId=UpdateStep30&workflowId=712b088a-9dc1-4b3a-acc2-a1e8e8ebcacf&user_lcid=1033

We found that one of the custom field(“custom_field”) we had created was causing this issue. This field was put on the form.

We understood the problem. We had created a field with same schema name earlier with “Single Line of Text” type and later we realized that the field should have…

View original post 71 more words

Sample Code for Autonumbering in Dynamics 365 July 2017 Update

As a first step, add references to the latest version 9 assemblies

https://www.nuget.org/packages/Microsoft.CrmSdk.CoreAssemblies/

In the below sample code, we are creating an Auto number attribute in Contact Entity.

This is how the fields shows up inside contact form.

Using UpdateAttribute Request we can update the format for the AutoNumber field.

And also, we can have multiple auto number fields for an entity as shown below.

Sample Code


CreateAttributeRequest createAttributeRequest = new CreateAttributeRequest();
createAttributeRequest.EntityName = "contact";

var autoNumberAttributeMetadata = new StringAttributeMetadata()
{
AutoNumberFormat = "Auto Number - {SEQNUM:4} - {RANDSTRING:4} - {DATETIMEUTC:yyyyMMddhhmmss}",
SchemaName = "new_autonumber1",
MaxLength = 100,
RequiredLevel = new AttributeRequiredLevelManagedProperty(AttributeRequiredLevel.ApplicationRequired),
DisplayName = new Microsoft.Xrm.Sdk.Label("My Auto Number", 1033),
Description = new Microsoft.Xrm.Sdk.Label("This is my first auto number field through SDK", 1033)
};

createAttributeRequest.Attribute = autoNumberAttributeMetadata;
var response = organizationService.Execute(createAttributeRequest);

And now the simplest and best way to create these Auto Number fields à

Using Auto Number Manager developed by Jonas Rapp, Microsoft MVP.

https://www.linkedin.com/pulse/auto-number-attributes-microsoft-dynamics-365-jonas-rapp/

https://www.xrmtoolbox.com/

https://github.com/MscrmTools/XrmToolBox

Hope it helps..

Microsoft.CrmSdk.CoreAssemblies Version 9.0.0.5 available now

Finally, we have the new assemblies available 🙂

https://www.nuget.org/packages/Microsoft.CrmSdk.CoreAssemblies/9.0.0.5

new_sdk

Dynamics 365 Relationship Insights-An error has occurred. Error ID :: InvalidTenantProductId in Dynamics 365 July 2017 Update

While trying to configure Relationship Insights in Dynamics 365 July 2017 Update

I am getting the below issue.

Is anyone else facing the same ?

Members Count field not getting updated on converting Dynamic Marketing List to Static Marketing List – issue in Dynamics 365 July 2017 Update

While trying out few things in July 2017 update of Dynamics 365, we encountered a strange issue.

The members count field was properly in case of Static Marketing List, however, while converting the Dynamic Marketing List to Static (using Copy To Static), this field was not getting populated.

And also, the field was getting unlocked in case of Update Form for both Static and Dynamic Marketing list, unlike earlier version where this field was always locked on Form.

The field properly calculating count and locked in case of earlier versions.

Hope it helps..