Provisioning Package with -r Errors About Seed Data with Same Name

#1

I’m provisioning my package with -r, yet I’m getting errors about this object in my environment. If i go remove() and removeSeedData(), it provisions successfully. But, I have to do this every time. Is something wrong?

updateBatch failed due to multiple errors: \nTarget id: MDF.Group.IS_User, msg: Object with same name already exists in type AdminGroup for unique index: C3_2_ADMIN_MEMBER_U_1 for object with id MDF.Group.IS_User. Please change to unique values.

This is my type:

{
  "id" : "MDF.Group.IS_User",
  "name" : "IS Basic User",
  "roles" : [
    {"id": "MDF.Role.IS_User"},
    {"id": "ui.Role.UIAccessRole"},
    {"id": "CheckoutEnabledUser.Role"}
 ]
}
0 Likes

#2

The error says that another object (i.e. an object with an id other than MDF.Group.IS_User) also has the name IS Basic User. As AdminGroup.name is inherited from Member.name, make sure there are no seed objs of any type that extends Member with that same name. See Member documentation for types that extend Member.

0 Likes

#3

There’s no other data with that name.

0 Likes

#4

If you change name to MDF.Group.IS_User, do you still get the same provisioning error? In general, best practice for AdminGroup (and Role) is for the id and name to be the same in order to avoid conflicts like this (since name also has a uniqueness constraint), and instead use the description field for a human-readable description of the admin group.

0 Likes

#5

Seemed to work :+1: (20 char limit blah blah blah)

0 Likes