Microsoft Dynamics CRM New Zealand NZ Partner Magnetism

  • News & Events

    Keep up with the latest and greatest news, events and knowledge from the Magnetism team.

Magnetism xRM blog Contact Us

Gayan Perera Blog

  • 07 Jan

    Code Generating Code…programmatically retrieve N:N relationships


    We recently needed to write a plugin that associated multiple different record types with a custom entity. The custom entity contained over 30 system many to many relationships with the other record types.

    We could’ve taken a couple of different approaches. One would’ve been to dynamically retrieve the relationship when the plugin ran, this means an extra call to the CRM service. The other option was to have a static dictionary mapping inside the plugin code.

    We chose the 2nd option because the relationships would not change and there is no need to make an additional call to the ...

    Read full post
  • 30 Dec

    Automated Deployment Tools for CRM 2011 – Import Solution with Progress


    We use a lot of automated tools to deploy solutions to our test, UAT and production environments. One of the tools allows us to rapidly deploy a solution into multiple environments. For example, extracting a managed solution from DEV to TEST then to UAT, once UAT has passed we need to deploy up to 20 Dynamics CRM Online instances, doing this manually is too time consuming…

    The tool looks at an xml file which specifies the connection settings for multiple CRM organizations, then when it’s run it’ll import and report the progress.

    Here’s the code (stripped down only to ...

    Read full post
  • 14 Dec

    Programmatically downloading image files from Dynamics CRM 2011


    We came across an issue with an upgrade from CRM 4 to CRM 2011 where the images were all messed up, transparency was gone and had pixelated images, there were over 100 custom entities and download/uploading these manually was not an option.

    Here’s a small bit of code to download image web resources from Dynamics CRM 2011.

    private  static  void DownloadIcons(IOrganizationService sdk,  string path)
    {
         QueryExpression qe =  new  QueryExpression("webresource");
        qe.ColumnSet =  new  ColumnSet("name",  "webresourcetype",  "content",  "displayname");
     
         // 7 = gif, 10 = ico
        qe.Criteria.AddCondition(...
    Read full post
  1. 1
  2. 2
  3. 3
  4. 4
  5. 5
  6. 6
  7. 7
  8. 8
  9. 9
  10. Next page
Contact Us