Several users add SPListItem
-
02-01-2021 - |
Pergunta
Will there be any problems (e.g. save conflicts) if several users at the same time will try to programmatically add SPListItem
to SPList
?
public override void Add(Contract contract)
{
var listItem = List.Items.Add();
GetListItem(contract, listItem);
listItem.SystemUpdate(false);
}
protected override void GetListItem(Contract contract, SPListItem listItem)
{
listItem[Fields.Title] = contract.Name;
listItem[Fields.BeneficiaryBirthdate] = contract.BeneficiaryBirthdate;
...
}
Solução
No,
There will be no save conflict when multiple users will add new item to the SharePoint List.
Outras dicas
As it is new Item, it wont give any error! if its update then you will get error if same item is getting updated by different users at same time
Licenciado em: CC-BY-SA com atribuição
Não afiliado a sharepoint.stackexchange