New XrmToolBox plugin : Import/Export NN relationships
Two plugins in one day! wow!
This one was, in fact, developed a couple of months ago.
One of my colleague was using a solution from my fellow MVP Andrii Butenko which allows to import/export NN relationships in a silverlight web resource. This was nice but my colleague was using other attributes than primary key to do the mapping and Andrii’s solution does not support this.
So he asked me to develop a XrmToolBox’s plugin that could do this.
And, here it is! You can select entities and relationships and moreover, choose mapping attributes on both enitities. I only let text and number attributes selectable as other does not really make sense for mapping purposes.
Then you can import or export NN relationships!
Here is a preview
As usual, this plugin, among other, is available with XrmToolBox on CodePlex
Comments
The NN relationships import/export is a really usefull tools. But I didn't find how to import reflexive relationship : there is an error : "Entity role must be specified for reflexive relationship". Is there a way to do it?
Thank you
I think it's possible since it's possible in dev with :
associateRequest.Relationship.PrimaryEntityRole = EntityRole.Referenced;
Please let me know if you adapt it.
Regards
Many thanks for the tool!
I would like to use it to import some many to many relationships into customer tables. I am unable to get it to work however. Please could you explain what format the import file should be.
Thank you
For first-time users, I found another post helpful for explaining the format required (semicolon delimited):
http://blog.interdynartis.com/how-to-import-nn-relationships-in-microsoft-dynamics-crm
$businessunitguid = (Get-CrmRecords -EntityLogicalName businessunit -Fields * -FilterAttribute name -FilterOperator eq -FilterValue $crmuser.businessunit -TopCount 1).CrmRecords.businessunitid this picks up the guid for the email address passed in, and then $rolename1_id = fiscrm-get-secroleidbyname $crmuser.rolename1 $businessunitguid picks up 1 or more guids of the rolenames (if the length of $rolename1_id is less than 36 then I am dealing with a table of similar role names, and selection of the first one - or $rolename1_id.GetValue(0) will be the correct one for the business unit. Adding this type of logic in for those entities that are reactive to businessunit settings would help expand the use of this tool significantly.
Regards,
Bill.suycott@fisglobal.com
The tool can handle this scenario if you work with role id instead of role name. You can prepare all the work in Excel then export only required information (ie. role id/user information)