Using Lookup Transformation and Cache Transformation in SSIS for Dynamics 365 (using Kingswaysoft)

Recently while working in data migration project, we had a requirement to insert a record in CRM from SQL Database and assign it to the team insert.

For e.g.

We had a Transaction Record that had a Brand lookup in it i.e. n – 1 relationship.

And the Brand record had a lookup of Team in it again n – 1. So basically, while inserting the transaction record we wanted to assign the record to the team of the corresponding brand in it.

So, for this, we had to set the owner id and owner id type field while inserting the record.

And for owner id i.e. team GUID we had to do a lookup on the Brand entity.

To achieve so, we did the following step

Added 2 Data flow task in the Control Flow, one for Caching the Brand entity’s detail and other for using the fetching data from SQL DB, Lookup Transformation task and inserting the data into CRM.

For the first data flow task,

We added the Dynamics CRM Source and fetched the Brand Name and Team Lookup’ GUID field.

name field which will be used for mapping and teamid field whose value we need from it.

Then we added a Cache Transform task with following details,

Now for our second data task flow,

First, we added the OLE DB Source to fetch data from the source SQL View, having Brand (string) column in it.

Then we added the Lookup Transformation task with following properties,

Setting Connection to Cache Connection Manager defined earlier.

Now the most important part, the columns properties. Here we defined the mapping between the Brand field of the SQL View and name field of the Brand Entity of CRM and selected the teamid field as the lookup column whose value we would like to fetch as shown below.

Then we added Derived Column task to add one more column for specifying ownerid type field to be used in CRM Destination Component while mapping. We defined the field type as string and hardcoded the value as “team”.

And as the final step mapped the above fields to the corresponding ownerid and owneridtype field in CRM Destination Component for Create operation.

For ownerid, we selected the below option as we were setting the GUID of the team.

On running the package, we can see the transaction records getting created and properly assigned to the corresponding team of the brand.

The transaction record with Team set as Owner.

Brand record with Team lookup in it.

Hope it helps..

Operation on clone solution failed error during solution import in Dynamics 365

We’d get this error if we are trying to import a solution whose upgrade solution is already there in the target system.

So, either we need to Clone the Solution to remove the upgraded solution or we need to delete the Upgrade Solution. Deleting the Upgrade solution will only delete the solution it will not delete the components as it will already be there in the main solution whose upgrade has been imported.


Hope it helps..

The import of the solution failed – The specified role cannot be updated error in Dynamics 365

We got this error while trying to import managed solution to our TEST environment.

The detail of the error message clearly tells the reason for the error.

The error was because that we had a similar a role with same name in our TEST environment, and in DEV we had renamed that existing role and had created a new role with similar name.

So, while trying to import the solution, CRM was getting confused as it was able to find the role with same name but different id.

To fix this either rename the Role in DEV and export and import it back or rename the role in TEST to and them import the same solution.

Hope it helps..

The record could not be deleted because of an association exception in Dynamics 365

Recenlty while trying to delete product records, we got the below error.

The quick way to figure out which associated entity’s record could have restricted the deletion of the record, open the 1:N relationship for the entity.

Search for any Parental, Referential Restrict Delete or any System relationship that has Restrict set for Delete action.

In our case it was the System relationship of Product with Opportunity Product

With Restrict Behavior set for Delete action.

Deleting all the opportunity product record allowed us to delete the Product records.

Hope it helps..

Insufficient Permissions error while updating records using Excel Online in Dynamics 365

Recently one of our users reported the below while trying to bulk update the records using Excel Online feature.

The user had the Update rights for those records.

Basically, the Excel Online update features creates a data import job in the background.

https://debajmecrm.com/2015/11/14/dynamics-crm-excel-online-field-changes-save/

So the user had to be given the import data rights.

We resolved the issue by giving the following rights to the user at organization level.

  • Data Import
  • Data Map
  • Import Source File
  • Web Wizard
  • Web Wizard Access Privilege
  • Wizard Page

https://community.dynamics.com/crm/b/crmpowerobjects/archive/2015/08/18/data-import-privileges

Hope it helps..

The unit schedule id is missing error while trying to migrating product in Dynamics 365

Recently while trying import products from our Dev to Test environment using the Configuration Migration tool we got the below error

The reason being we were using default unit as a unit group in out DEV and the same wasn’t there in the TEST environment. Interestingly if we set the correct GUID in the data.xml generated by Configuration Migration tool and try importing, still the products do not get imported.

So basically, if we try importing the products entity alone we might run into issues. To migrate it properly we need to add the related entities along with it as mentioned in the Microsoft documentation.

https://docs.microsoft.com/en-us/dynamics365/customer-engagement/admin/manage-product-catalog-configuration

We created a new schema file with Product and its related entities, and this time migration worked properly.

Hope this helps.