Reputation: 689
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
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
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