Quantcast
Channel: Microsoft Dynamics CRM
Viewing all articles
Browse latest Browse all 154803

Forum Post: RE: Customize entity views on Two Options Field not working

$
0
0
Hi, The reason it is not working is because you are using switch case which works with an integer expression not boolean ,due to which always your default case is running. Also,tooltip and imgname both should have values then only it will apply.In your code you are making them blank inside switch cases ,dont do that. I have refactored your code for switch case,try it: function displayIconTooltip(rowData, userLCID) { var str = JSON.parse(rowData); var coldata = str.new_mytruefalse_Value; var imgName = ""; var tooltip = str.new_mytruefalse; coldata=coldata ?1:0; switch (coldata) { case 0: imgName = "new_/images/error.png"; break; case 1: imgName = "new_/images/checked.png"; break; default: imgName = ""; tooltip = "Default"; break; } var resultarray = [imgName, tooltip]; return resultarray; }

Viewing all articles
Browse latest Browse all 154803

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>