Quantcast
Viewing all articles
Browse latest Browse all 82002

How to make a field visible based on status in Opportunity

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);

}

}


Viewing all articles
Browse latest Browse all 82002

Trending Articles