web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

No record found.

News and Announcements icon
Community site session details

Community site session details

Session Id :
Microsoft Dynamics CRM (Archived)

Save & Close button not working on new record - CRM 365 Online( 8.2)

(0) ShareShare
ReportReport
Posted on by 270

Hi,

We are using multiple forms for account entity ( Main Account  and Sub Account).  Based on the parent account lookup value switching the forms. If parent account contains data it means sub account else main account. Form switching is working fine.

 

But when we are adding a new  sub account from main account “save and close” is not working as expected.  

Below script used for switching the forms.

function navigateForm() {

var formToNavigate = "MainForm";
var currentForm = Xrm.Page.ui.formSelector.getCurrentItem().getLabel();
var formType = Xrm.Page.ui.getFormType();

var parentAccount = Xrm.Page.getAttribute("parentaccountid");
if (parentAccount.getValue() != null) {
formToNavigate = "SubForm";

if (currentForm != formToNavigate) {
var items = Xrm.Page.ui.formSelector.items.get();
for (var i in items) {
var item = items[i];
var itemId = item.getId();
var itemLabel = item.getLabel()
if (itemLabel == formToNavigate) {
item.navigate();
}
}
}
}

 

Could you please let me know if you have any idea on this.

Thanks,

Venky

*This post is locked for comments

I have the same question (0)

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Stars!

Meet the Microsoft Dynamics 365 Contact Center Champions

We are thrilled to have these Champions in our Community!

Congratulations to the April Top 10 Community Leaders

These are the community rock stars!

Leaderboard > 🔒一 Microsoft Dynamics CRM (Archived)

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans