Quantcast
Channel: CRM Development forum
Viewing all articles
Browse latest Browse all 8223

CRM 2011 C# Plugin: IF Statement for Bit (Two Options Field)

$
0
0

Hello, I am having difficulties creating an IF statement for a bit (two option) field.

My current syntax is not working, please help!

if (targetEntity.Contains("apd_twooptionsfield") && targetEntity.GetAttributeValue<bool>("apd_twooptionsfield") == true)
{}

In VS2010 I do not have any errors but when I run the code in CRM, it will not step into the if statement and the code does not fire.


Mike Karls


Viewing all articles
Browse latest Browse all 8223

Trending Articles



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