Skip to main content

Notifications

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

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

Announcing the Engage with the Community forum!

This forum is your space to connect, share, and grow!

🌸 Community Spring Festival 2025 Challenge Winners! 🌸

Congratulations to all our community participants!

Adis Hodzic – Community Spotlight

We are honored to recognize Adis Hodzic as our May 2025 Community…

Leaderboard > Microsoft Dynamics CRM (Archived)

#1
Mohamed Amine Mahmoudi Profile Picture

Mohamed Amine Mahmoudi 83 Super User 2025 Season 1

#2
Community Member Profile Picture

Community Member 54

#3
Victor Onyebuchi Profile Picture

Victor Onyebuchi 6

Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans