Hi,
I am having an issue trying to auto change the form based on a field value. We are trying to have accounts that show "Parent" as their custmer number be routed to the Parent Account form while if it is an actual customer nmber be routed to their normal divisional form.
I have read some blog posts on here but they seem to not be helpful with this issue.
Any help or guidance is welcome.
Here is what I have so far...
function naParentAccountForm() {
var customerNumber = Xrm.Page.getAttribute("pvs_jdecustomerno");
if (Xrm.Page.ui.formSelector.getCurrentItem() != null) {
var formType = Xrm.Page.ui.formSelector.getCurrentItem().getLabel();
if (customerNumber == ("--Parent--" || customerNumber == "--Master--" || customerNumber == "--Global--") && (formtype != "Parent Account Form")){