locked
CRM 2013 - Use a custom entity and pull the configuration from it RRS feed

  • Question

  • Does any one has any recommendation regarding How to pull out some environment related values between CRM 2013 Prod/Stage/Test environments?? 

    I mean we can do customization for JavaScript/Plugin/Sitemap/Commandbar/Entities and all this customization we can import-Export into CRM 2013 Prod/Stage/Test environments, but every environment suppose to call different webserver/URLs/connectionstrings and so on depending upon environment. 

    Monday, October 27, 2014 6:07 PM

Answers

  • We use a custom entity to store configuration values, and have a library of functions to read them from javascript, plugins and workflow activities. It takes a bit of time to create the function library, but it then means you can separate the  configuration data in solutions from the environment specific configuration data

    Microsoft CRM MVP - http://mscrmuk.blogspot.com/ http://www.excitation.co.uk

    Monday, October 27, 2014 7:34 PM
    Moderator
  • I agree with David. If you are talking about URL, webserver name etc, they are readily available from JavaScript, plugin and reports

    only if you are using a connection string to a third database, you will need a custom entity to store this. Again if the connection string is used in plugin, you could use secure /unsecure parameters.

    discovery services will get you server and organization details.

    regards

    Jithesh

    • Marked as answer by Nicksoft2011 Friday, December 5, 2014 8:16 PM
    Monday, October 27, 2014 8:13 PM
  • Thanks for the direction here. So if we are talking about storing those parameter values into Custom Entity,  Are we going to use Fields to store those value or How?? Also What relationship we have to create for that custom entity??

    Any link/article/example of How to access that Entity data from JavaScript/Plugin/Workflow??

    • Marked as answer by Nicksoft2011 Friday, December 5, 2014 8:16 PM
    Tuesday, October 28, 2014 4:02 PM
  • the approach is to create an entity and store data as records. The script will be similar to accessing a contact or an account.

    regards

    Jithesh

    • Marked as answer by Nicksoft2011 Friday, December 5, 2014 8:16 PM
    Wednesday, October 29, 2014 11:35 AM
  • Hi Nicksoft2011,

    We like to use an XML web resource for storing this type of information.  Doing so allows us to leverage some CI logic to ensure we use the right configuration when we do a build within visual studio.  (i.e. we change the release in Visual Studio, submit the project to the build server, and when everything is all said and done we get back a solution file that contains the correct config file and if you CI is really good it'll even be publish the solution to the desired server)
    Wednesday, October 29, 2014 11:52 AM
  • hi Eric,

    this is also a good approach - similar to cascade option set setting sample in SDK.

    thank you for sharing.

    regards

    Jithesh

    • Marked as answer by Nicksoft2011 Friday, December 5, 2014 8:16 PM
    Wednesday, October 29, 2014 11:57 AM

All replies

  • We use a custom entity to store configuration values, and have a library of functions to read them from javascript, plugins and workflow activities. It takes a bit of time to create the function library, but it then means you can separate the  configuration data in solutions from the environment specific configuration data

    Microsoft CRM MVP - http://mscrmuk.blogspot.com/ http://www.excitation.co.uk

    Monday, October 27, 2014 7:34 PM
    Moderator
  • I agree with David. If you are talking about URL, webserver name etc, they are readily available from JavaScript, plugin and reports

    only if you are using a connection string to a third database, you will need a custom entity to store this. Again if the connection string is used in plugin, you could use secure /unsecure parameters.

    discovery services will get you server and organization details.

    regards

    Jithesh

    • Marked as answer by Nicksoft2011 Friday, December 5, 2014 8:16 PM
    Monday, October 27, 2014 8:13 PM
  • Thanks for the direction here. So if we are talking about storing those parameter values into Custom Entity,  Are we going to use Fields to store those value or How?? Also What relationship we have to create for that custom entity??

    Any link/article/example of How to access that Entity data from JavaScript/Plugin/Workflow??

    • Marked as answer by Nicksoft2011 Friday, December 5, 2014 8:16 PM
    Tuesday, October 28, 2014 4:02 PM
  • the approach is to create an entity and store data as records. The script will be similar to accessing a contact or an account.

    regards

    Jithesh

    • Marked as answer by Nicksoft2011 Friday, December 5, 2014 8:16 PM
    Wednesday, October 29, 2014 11:35 AM
  • Hi Nicksoft2011,

    We like to use an XML web resource for storing this type of information.  Doing so allows us to leverage some CI logic to ensure we use the right configuration when we do a build within visual studio.  (i.e. we change the release in Visual Studio, submit the project to the build server, and when everything is all said and done we get back a solution file that contains the correct config file and if you CI is really good it'll even be publish the solution to the desired server)
    Wednesday, October 29, 2014 11:52 AM
  • hi Eric,

    this is also a good approach - similar to cascade option set setting sample in SDK.

    thank you for sharing.

    regards

    Jithesh

    • Marked as answer by Nicksoft2011 Friday, December 5, 2014 8:16 PM
    Wednesday, October 29, 2014 11:57 AM