Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>Not using BusinessEntity (unless you use reflection). DynamicEntity is enumerable by types deriving from Property. You'll have to do something like (I did this from memory, so might not compile)...</p> <pre><code>for(int i = 0; i &lt; colnames.length; i++) { string colName = colnames[i]; foreach(Property prop in tmp) { if (prop.name != colName) continue; if (prop is StringProperty) { var strProp = prop as StringProperty; Response.Write(String.Format("{0}: {1}&lt;BR /&gt;", colName, strProp.Value)); } else if (prop is LookupProperty) { ... } ... for each type deriving from Property } } </code></pre> <p>Reply to Note 1 (length):</p> <p>Could you give me an example of what you're using. If you are only looking at the base types (Property) then you won't be able to see the value property - you'll need to convert to the appropriate type (StringProperty, etc).</p> <p>In my example tmp is a DynamicEntity (it defines GetEnumerator which returns an array of Property). The other way to access the properties of a DynamicEntity is using the string indexer. For tmp: </p> <pre><code>string firstname = (string)tmp["firstname"]; </code></pre> <p>Note that if you use this method, you get the Values (string, CrmNumber, Lookup) and not the whole property (StringProperty, CrmNumberProperty, etc).</p> <p>Does that answer your question? Also, I recommend using the SDK assemblies and not the web references. They're much easier to use. The SDK download has a list of helper classes if you choose to use the web references, however. Search "Helper" in the SDK.</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload