Tom
Tom

Reputation: 689

SP2013: Default items in list are duplicated after APP update

I'm making share-point hosted APP via MS Visual Studio.

In app I need to have lists with default values. I'm adding them into the list by .xml under list instance.

eg.

<Data>
      <Rows>
        <Row>
          <Field Name="Text">Accounting</Field>
        </Row>
        <Row>
          <Field Name="Text">Accounts Payable</Field>
        </Row>
        ....

After app is published to company app store catalog, installed to the team site and updated to new version, default items are duplicated.

How can this be fixed? eg. add items only if they doesn't exists..

Thanks!

Upvotes: 1

Views: 1020

Answers (2)

Milen
Milen

Reputation: 674

Recommended approach is to provision your list data through code in a Feature Receiver.

Alternatively you can give a value for ID field: 1

Upvotes: 3

user3081933
user3081933

Reputation: 1

mark the correct listinstance in your Solutionexplorer and set "Deployment Conflict Resolution" to "Automatic" in the properties explorer! That solved the problem for me. If not, try the other values too ("Promt", "None")!

Upvotes: 0

Related Questions