bcolpaert / Colso.Xrm.DataTransporter

XrmToolbox plugin to help you to transfer records across organizations
MIT License
21 stars 15 forks source link

Possiblity to transfer primary unit (relevant for product- and opportunity-migration) #27

Open duck-o-saurus opened 6 years ago

duck-o-saurus commented 6 years ago

Hi Bram,

i mentioned this problem already shortly inside issue #26, but since this wasn't the main-target of this issue, i will post a detailed view on this in this new issue.

When you import a product (with it's productid) you need an uomschedule (with it's uomscheduleid) and an uom (with it's uomid) (inside the product-entity it's called defaultuomscheduleid and defaultuomid). You run into trouble for an import when you use the uomschedule's baseuom for a product's default uom.

This problem occurs, because you can't import the baseuom (with its id) like a regular uom. Each uom requires for its creation an already existing baseuom. The only way to create a baseuom is to create a new uomshedule.

The uomshedule can be fully imported (including the name of the baseuom), but during the import-process of the uomshedule the baseuom (with the name defined in the uomshedule) will be automatically created with a new id.

Maybe this could also be solved via an auto-mapping-option.

\EDIT: This is also relevant for migrating opportunities: Entity: opportunityproduct, Field: uomid But without the field uomid, it's not possible to migrate this entity at all.

Best greetings :-)