Possible explanations and solutions for the MincheckAffectedRowCountException error.
If the database data has "\r\n" line endings and if that data is used in an update statement, the data from the Hybrid App control is compared to the database data and they will not match, so an MincheckAffectedRowCountException error is thrown. The Document Object Model (DOM) parser converts "\r\n" at the end of line characters to just "\n" when the Hybrid App message is received from the server.
Solution: In the Custom.js file, add this code to customBeforeSubmit to turn the "\n" back to "\r\n":
var idx; var values = workflowMessageToSend.getValues(); var count = values.getCount(); var keys = values.getKeys(); for (idx = 0; idx < count; idx++) { var data = values.getData(keys[idx]); var dataType = data.getType(); if (dataType === "TEXT") { var value = data.getValue(); if (value.indexOf("\n") > 0) { var newValue = value.replace(/\n/gi, "\r\n"); data.setValue(newValue); } } }
The client is specifying outdated values for an update operation, which do not match the values in the back-end datasource.
This line contains the old values that are being sent from the client.