Handling of the RecordType.


This feature allows a simple automatic migration of the RecordType with the records .

Feature overview:

Sometimes you want to keep the RecordType of the records during the migration, to be assigned in the Target environment to the same record type as in the Source. Moreover, in some case you can have several record types with the same DeveloperName that can cause difficulties to distinguish them in the Target. The Plugin as an option to handle all these use cases.

  • If you just want to export record by preserving RecordType, simply include RecordTypeId field in the query and the Plugin will do the rest.

  • In more complex scenarios you want to customize the export of the RecordType by adding the RecordType object definition to your export.json.

    Below find the example of full RecordType object definition within export.json:

     objects: [
          .....
          {
              "query": "SELECT Id FROM RecordType WHERE IsActive = true",
              "externalId" : "DeveloperName;NamespacePrefix;SobjectType"
          }
           .....
      ]
    
    • In this example the Plugin will include only the active record types. So the records which has inactive record type assignments will then reassigned to the Master record type in the Target.

      The externalId key has composite external id format that takes in account the developer name, namespace and the type of the sObject being transferred.

    • "DeveloperName;NamespacePrefix;SobjectType" is also the default value for the RT externalId when there is no RecordType section included in the script and you just add RecordTypeId in your query. This value is recommended in most cases. But of course you can setup another external id keys as you wish.

    • You can also customize the SOQL query to RecordType to suite it to your specific case.

Last updated on 15th Mar 2024