I added a custom field in Opportunity and I would like that field to show up for Lost opportunities. I have below code but it is not working. I am new to CRM coding.
function Hidecompetitor() {
var nameValue = Xrm.Page.getAttribute("statecode").getValue();
if (nameValue = 'Lost') {
Xrm.Page.getControl("aam_competitor").setVisible(true);
}
}
*This post is locked for comments