I've looked at other posts and found some code to leverage but it doesn't do anything on my form.
I created a web resource html with the following:
<html><head>
<meta><meta><meta></head>
<body onfocusout="parent.setEmailRange();" style="overflow-wrap: break-word;">
<button onclick="SaveForm()">Save Notes</button>
<script>
function SaveForm(executionContext) {
debugger;
var formContext = executionContext.getFormContext();
var id = formContext.data.entity.getId();
var entity = formContext.data.entity.getEntityName();
if (executionContext != null) {
if (formContext.data.entity.getIsDirty()) {
alert("3");
}
//formContext.data.entity.save();
formContext.data.save().then(
function () {Xrm.Utility.openEntityForm(entity, id);},
function () {alert(errorCode+message)},
)
}
}
</script>
</body></html>
've added this to my form.
Button shows up fine but doesn't actually save. Still says unsaved changes in bottom right.
Not giving me any errors either.
Any ideas?
Thanks,
Terry