Quantcast
Channel: Microsoft Dynamics CRM Forum - Recent Threads
Viewing all articles
Browse latest Browse all 79901

C#, attribute doesn't exist in the DB, how can I check for this?

$
0
0

I have written some code in .net that tries to push some data into a field called "Mobile Reference" - how do I test to see if the field exists in the database before pushing my changes.

Normally I do: 

Entity contact = new Entity("contact")

{

  contact["mobilereference"] = "12345678".

}

But in the above case; the contact entity does not contain a field called "mobilereference", which needs to be created. How do I check for this?

I have tried:

if (contact.Contains("mobilereference")

{

// Do work

}

But that does not work. Anyone know how?


Viewing all articles
Browse latest Browse all 79901

Trending Articles



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