Leave a comment


  1. guest

     /  October 26, 2011

    Excellent! Thank you for sharing 🙂

  2. Peter Hale

     /  February 7, 2012

    Hi Pete

    scripts 1 and 2 work fine – the third full one give an error

    Msg 512, Level 16, State 1, Line 1
    Subquery returned more than 1 value. This is not permitted when the subquery follows =, !=, <, , >= or when the subquery is used as an expression.


    Another Pete

  3. Maarten Docter

     /  February 13, 2012

    Hi Pete,

    Thank you for sharing! Great work!

  4. Howdy I am so thrilled I found your weblog, I really found you by mistake, while I was looking on Askjeeve for something
    else, Anyhow I am here now and would just like to say
    many thanks for a remarkable post and a all round entertaining blog (I also love
    the theme/design), I don’t have time to read through it all at the minute but I have saved it and also included your RSS feeds, so when I have time I will be back to read much more, Please do keep up the excellent job.

  5. Asking questions are really good thing if you are not understanding something entirely, except this paragraph provides pleasant understanding yet.

  6. David cat

     /  May 13, 2013

    Thanks for your post! Really helpful.
    However, I have a question for you: How would you list only the fields being used in the CRM? (Only the ones appearing in the forms)

  7. I blog frequently and I seriously thank you for your content.
    The article has really peaked my interest. I’m going to bookmark your blog and keep checking for new information about once a week. I subscribed to your RSS feed too.

  8. J. Hogue

     /  October 24, 2013

    Rewrite of third script:

    at.Description as AttributeType,
    d.Label as Description
    FROM MetadataSchema.Entity e
    INNER JOIN MetadataSchema.Attribute a
    ON a.EntityId = E.EntityId
    AND YEAR(a.OverwriteTime) = 1900
    INNER JOIN MetadataSchema.AttributeTypes at
    ON a.AttributeTypeId = at.AttributeTypeId
    INNER JOIN MetadataSchema.LocalizedLabel l
    ON a.AttributeId = l.ObjectId
    AND YEAR(l.OverwriteTime) = 1900
    AND l.ObjectColumnName=’DisplayName’
    LEFT JOIN MetadataSchema.LocalizedLabel d
    ON a.AttributeId = d.ObjectId
    AND YEAR(d.OverwriteTime) = 1900
    AND d.ObjectColumnName=’Description’
    WHERE e.Name=’Account’

  9. CuriousCRMer

     /  March 10, 2014

    If I have an option set that is not on any entity, how can I retrieve its options via c#? I can see my new optionset in OptionSetLogicalView, but not the options themselves, and StringMap seems to assume that the optionset is related to a particular entity.


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: