I want to check the following conditions through plugin :
1.if website field = null then insert google.com into website field
2.if website field = "google.com" then change it to yahoo.com
if (entity.LogicalName == "account") { string web1 = "google.com"; if (entity.Attributes["websiteurl"].Equals(web1) ) { string web2 = "yahoo.com"; entity.Attributes["websiteurl"] = web2.ToString(); } if (entity.Attributes["websiteurl"].Equals(null)) { string web = "google.com"; entity.Attributes["websiteurl"] = web.ToString(); }
I have been using this code but its not working...