'xrmApp.Entity.Save() is not working -System.InvalidOperationException: 'Save Button is not available'

I am facing an exception while trying to save my my easy repro project.

System.InvalidOperationException: Save Buttton is not available

        xrmApp.Navigation.OpenSubArea("Stakeholder Profiles", "Stakeholder Individuals");
        xrmApp.CommandBar.ClickCommand("New");
        xrmApp.Entity.SetValue("firstname", TestSettings.GetRandomString(5,10));
        xrmApp.Entity.SetValue("lastname", TestSettings.GetRandomString(5,10));
        xrmApp.Entity.Save();

It was working before but now it is not. All my nuget packages are upto date but the save button is not being clicked and finally throws an exception.

I would appreciate the help here.



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source