« Creating Customer Relationships From the Grid | Main | Implementing Field Level Security in CRM 4.0 - Options and Constraints »

November 07, 2009

TrackBack

TrackBack URL for this entry:
http://www.typepad.com/services/trackback/6a00e54fb34b6f88330120a66051cb970b

Listed below are links to weblogs that reference Dynamic Entity Helpers Using Extension Methods:

Comments

Feed You can follow this conversation by subscribing to the comment feed for this post.

Vlad

Here is my samples (based on KeyProperty):

public static KeyProperty Key(this DynamicEntity dynamicEntity)
{
foreach (Property prop in dynamicEntity.Properties)
{
if (prop is KeyProperty)
{
return prop as KeyProperty;
}
}

throw new KeyNotFoundException("В коллекции свойств сущности нет свойства типа KeyProperty");
}

Also I use similar approach for Lookup fields:

public static BusinessEntity Entity(this Lookup lookup, string typeName)
{
return _service.Retrieve(
(lookup.type ?? typeName),
lookup.Value,
new AllColumns());
}

Note, you must pass the type of Lookup field, since "type" field often is null...

8gb usb drive

The obvious type would be AttributeCollection but would move unnecessary casting in some of the other extension methods. The types will be MetaTable for the table permissions extension method and MetaColumn for the others and any casting will then be hidden in the extension methods themselves.

Verify your Comment

Previewing your Comment

This is only a preview. Your comment has not yet been posted.

Working...
Your comment could not be posted. Error type:
Your comment has been posted. Post another comment

The letters and numbers you entered did not match the image. Please try again.

As a final step before posting your comment, enter the letters and numbers you see in the image below. This prevents automated programs from posting comments.

Having trouble reading this image? View an alternate.

Working...

Post a comment

CustomerEffective is a Microsoft Gold Certified Partner specializing in Customer Relationship Management (CRM) implementation, development and integration. We help organizations improve profitability through automation of sales, service and marketing processes.

Twitter Updates

    follow me on Twitter

    Search The Blog

    • Search the Blog
       

      WWW
      blog.customereffective.com
    Subscribe to this blog's feed

     Subscribe in a reader

    Add to Google Reader or Homepage

    Enter your email address:

    Delivered by FeedBurner