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

Notifications

Announcements

No record found.

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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics CRM (Archived)

#1
SA-08121319-0 Profile Picture

SA-08121319-0 4

#1
Calum MacFarlane Profile Picture

Calum MacFarlane 4

#3
Alex Fun Wei Jie Profile Picture

Alex Fun Wei Jie 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans