I have the following code to hide/show a section but it's failing and I don't know why. Anyone able to help?
function showHideSection(){ var type = Xrm.Page.getAttribute("new_digitalmarketingtype").getValue(); if (type == 172960000){ Xrm.Page.ui.tabs.get(“DigitalMarketing”).sections.get(“section_3”).setVisible(false); Xrm.Page.ui.tabs.get(“DigitalMarketing”).sections.get(“section_7”).setVisible(true); Xrm.Page.ui.tabs.get(“DigitalMarketing”).sections.get(“SEO_SEM_MA”).setVisible(true); } else if (type ==100000000){ Xrm.Page.ui.tabs.get(“DigitalMarketing”).sections.get(“section_3”).setVisible(true); Xrm.Page.ui.tabs.get(“DigitalMarketing”).sections.get(“section_7”).setVisible(false); Xrm.Page.ui.tabs.get(“DigitalMarketing”).sections.get(“SEO_SEM_MA”).setVisible(false); } else{ Xrm.Page.ui.tabs.get(“DigitalMarketing”).sections.get(“section_3”).setVisible(false); Xrm.Page.ui.tabs.get(“DigitalMarketing”).sections.get(“section_7”).setVisible(false); Xrm.Page.ui.tabs.get(“DigitalMarketing”).sections.get(“SEO_SEM_MA”).setVisible(false); } }
Getting this error. One of the scripts for this record has caused an error. For more details, download the log file.
ReferenceError: showHideSection is not defined at eval (eval at RunHandlerInternal (devarinet.crm.dynamics.com/.../ClientApiWrapper.aspx), <anonymous>:1:1)
*This post is locked for comments