Package Export & Import

I am using the PackageImportExport utility SP14 (build 7022). Can you anyone advise the 2 field on the Export screen:
  • Level: it defaults to 1
  • Export Referenced Items
I tried to export the Form and ItemType for ECR. and during import, I got the error below (tried with or without Export Referenced Items  option ticked): Grid Event Already exists. Violation of Primary Key constraint.   And there is no additional info provided.  I haven't had much success with the import, only worked very few items. I don't want to back up the whole database and restore it to another environment, which is not ideal when promoting changes to Prod! Any ideas?  
Parents
  • Hi fxdu168, The import/export tools do not delete items from the target database (by default). For example, say you have a list of countries with 3 values:
    1. China
    2. US
    3. Germany
    Then you modify the list to remove Germany and update "US" to "United States". Your exported list will look like this:
    1. China
    2. United States
    When you import that list into a target database with the previous version of the list, the import tool will add any items that don't exist in the target database (none in this example) and update any items that have the same id but different property values (US -> United States). The import tool does not delete items that exist in the target database but not the import package, otherwise it would be very easy to mess up your environment. If you need to delete items from the target database, you have a few options:
    1. Manually delete the items. This isn't ideal because it's time consuming and easy to make a mistake.
    2. Create some AML you can run in Nash to delete the items. This is a little faster to run, but you still need to build the AML.
    3. Include delete statements in your import packages. This is also a manual process, but it allows you to delete items during your import.
    For the example above, you would need to add a delete statement to remove the third entry from the list. Ex:
    <Item type="Value" id="{id of 'Germany' list value}" action="delete" />
    Eli
    Eli Donahue Aras Labs Software Engineer
Reply
  • Hi fxdu168, The import/export tools do not delete items from the target database (by default). For example, say you have a list of countries with 3 values:
    1. China
    2. US
    3. Germany
    Then you modify the list to remove Germany and update "US" to "United States". Your exported list will look like this:
    1. China
    2. United States
    When you import that list into a target database with the previous version of the list, the import tool will add any items that don't exist in the target database (none in this example) and update any items that have the same id but different property values (US -> United States). The import tool does not delete items that exist in the target database but not the import package, otherwise it would be very easy to mess up your environment. If you need to delete items from the target database, you have a few options:
    1. Manually delete the items. This isn't ideal because it's time consuming and easy to make a mistake.
    2. Create some AML you can run in Nash to delete the items. This is a little faster to run, but you still need to build the AML.
    3. Include delete statements in your import packages. This is also a manual process, but it allows you to delete items during your import.
    For the example above, you would need to add a delete statement to remove the third entry from the list. Ex:
    <Item type="Value" id="{id of 'Germany' list value}" action="delete" />
    Eli
    Eli Donahue Aras Labs Software Engineer
Children
No Data