When coding callouts:
string qualifiedStatus = opportunity.new_qualifiedstatus.Value.ToString();
new_qualifiedstatus is a picklist. If we haven't selected any value from that picklist we will get a null reference exception (not an empty or null string). So the right way to assign this would be:
if(opportunity.new_qualifiedstatus != null)
{
string qualifiedStatus = opportunity.new_qualifiedstatus.Value.ToString();
}
No comments:
Post a Comment