I have an app that users fill out requests on that get submitted to a dataverse table. When they click submit, this is the formula that is run:
Patch(
tbDV_ResbalRequests,
Defaults(tbDV_ResbalRequests),
{
RequestType: AppRecord.RequestType,
ProductCode: ThisRecord[@dvo_productcode],
ProductClass: AppRecord.ProductClass,
WarehouseCode: Left(AppRecord.Warehouse,2),
OrderType: Coalesce(Concat(Filter(orderTypes,selected = true),Left(orderValue,2),", "),Blank()),
SubmissionStatus: If(varCustServ,
"Submitted to CSR Manager",
If(AppRecord.ProductClass in ["RM","FG"],
"Submitted to Resbal Approver",
"Resource Master"
)
),
RequestNote: AppRecord.Notes,
RequestDate: Text(Today(),"mm/dd/yyyy"),
RunFlow: "Run",
RequestorMail: Lower(User().Email),
RequestorName: User().FullName
}
)
);
The issue comes when there is already a row on the dataverse table that has the same product code, request type, product class, warehouse code, and order types. That is when I get the error:
Network error when using Patch function: Conflicts exist with changes on the server, please reload.
I don't understand how this can be since I am patching as a new record, using 'Defaults()'. Is there something that I am missing?