Skip to main content

Notifications

Power Platform integration forum
Suggested answer

Error 0x83215603 when trying to save

Posted on by
 I have the below, it all works as expected but I keep getting the error 0x83215603 saving in progress when I attempt to save a record that is valid. The record still saves but gives the error. can anyone help 
 
var ProjectMainForm = (function () {
  /use strict/;
var SaveMode = {
    Save: 1,
    SaveAndClose: 2,
    SaveAndNew: 59,
    Autosave: 70
};
//var saveMode;
var isValidationNeeded = true;
var children = [];

function onSave(executionContext) {
    
     setTimeout(() => {
      processForm(executionContext);
     }, 9000);
    
    var eventArgs = executionContext.getEventArgs();
    // Exit if a previous handler has already called preventDefault
    if (eventArgs.isDefaultPrevented()) {
        return;
    }
    var saveMode = eventArgs.getSaveMode();
    // Exit if save mode is not one of the expected types
    if (![SaveMode.Save, SaveMode.SaveAndClose, SaveMode.SaveAndNew, SaveMode.Autosave].includes(saveMode)) {
        return;
    }
    var formContext = executionContext.getFormContext();
    var projectLevel = formContext.getAttribute(/dmis_displaylevel/).getValue();
    var correctLevel = true;  // Assume levels are correct until proven otherwise
    var levelErrorMessage = //;
    children.forEach((childLevel, index) => {
        if (childLevel <= projectLevel) {
            correctLevel = false;  // Found a child that is at the same level or lower
            //levelErrorMessage += `Child at index ${index} has a level of ${childLevel}, which is not allowed. `;
        }
    });
    if (correctLevel) {
        // All children are at acceptable levels; allow the save
        executeSave(formContext, saveMode);
    } else {
        // Prevent save and show error message
        eventArgs.preventDefault();
        levelErrorMessage += 'This record has children at or above the level attempting to be saved, please review children';
        var alertStrings = { confirmButtonLabel: /Cancel/, text: levelErrorMessage, title: /Children Preventing Save/ };
        var alertOptions = { height: 200, width: 400 };
        Xrm.Navigation.openAlertDialog(alertStrings, alertOptions);
    }
}
function executeSave(formContext, saveMode) {
    
    // Execute the appropriate save operation
    if (saveMode === SaveMode.Save || saveMode === SaveMode.Autosave) {
        formContext.data.entity.save();
    } else if (saveMode === SaveMode.SaveAndClose) {
        formContext.data.entity.save(/saveandclose/);
    } else {
        formContext.data.entity.save(/saveandnew/);
    }
}
  • Suggested answer
    Judy Profile Picture
    Judy Microsoft Employee on at
    Error 0x83215603 when trying to save
    Hi, can you specify what the product are you using? What the steps have you done?
    You said that when attempting to save a valid record, the error 0x83215603 kept prompt. Please verify if there are any dependencies or related records that need to be saved before saving the current record. Please ensure that all required data is populated correctly before attempting to save.
     
    Best Regards,
    Judy

Helpful resources

Quick Links

Can you answer this forum question?

You could make someone's day!

Community Newsletter - May 2024

Kudos to our community stars!

Community Spotlight of the Month

Kudos to Mohamed Amine Mahmoudi!

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 283,623 Super User

#2
Martin Dráb Profile Picture

Martin Dráb 224,463 Super User

#3
nmaenpaa Profile Picture

nmaenpaa 101,146

Product updates

Dynamics 365 release plans