What is the best way to store configuration strings
-
giovedì 7 giugno 2012 22:06
I need to store configuration strings much like I would store appsettings in a web.config or app.config. Older posts recommend storing configuration strings in a custom entity dedicated to that purpose, so I am hoping there is new way that is better in CRM 2011, but I am not finding it so far. Thanks.
- Modificato Jim Hammond giovedì 7 giugno 2012 22:07 mispellings
Tutte le risposte
-
giovedì 7 giugno 2012 22:07How I would do it? Store it in a custom entity? What's your problem with this method?
-
giovedì 7 giugno 2012 22:09I just don't want to build a custom solution if there is some out-of-the-box solution now that I am overlooking.
-
giovedì 7 giugno 2012 23:37
A Custom entity is how I'm storing such information. In my case, I've modelled a Singleton "Settings" entity instance.
A possible alternative, if you don't need (or want) to expose the settings for easily available modification by CRM Users is to use an XML Web Resource - it could be retrieved by server-side (.NET) or client-side (Javascript) code and parsed as required.
--pogo (pat) @ pogo69.wordpress.com
-
venerdì 8 giugno 2012 06:32we use custom entity to store settings, one record per one setting
-
venerdì 8 giugno 2012 09:23
1. Currently all my configuration settings are stored in my common abc.xml file and i kept the file in the physical server path like C:\Program files\Microsoft Dynamic CRM\Server\bin\assembly\abc.xml). So, all my server side custom pages, workflow and plugins are referring this location in order to check any settings as needed. This will eliminate to maintain settings in each applications.
2. The other option i would prefer to use custom entitiy to all your configuration settings. you can restrict all the users not to modify this entity by adjusting the security role. so whenever any configuration settings needed you can create crmservice and retrieve the values from this entity.
Regards,
safi.
SAFI
- Proposto come risposta StuartGrainger venerdì 8 giugno 2012 10:00
-
venerdì 8 giugno 2012 10:00
Depends on where your doing processing and what you want the settings for - just crm or own web services also. Saiulla suggestion is sound and very much like a web.config. Are you just using crm and your own logical controls, e.g. no other front end such as silverlight or html5?
Having an entity with Regx etc. is fine also. You can extend the administration side to include admin of the formats, pick lists etc. so it keeps it nice and contained but you can easily stick an asp.net app on top of the xml if required.
Thanks
Stuart
- Proposto come risposta StuartGrainger venerdì 8 giugno 2012 10:00
-
venerdì 8 giugno 2012 11:24
If you don't want a custom entity then you could also store it in XML and create a web resource for it. From your library you can read this webresource. It's maybe less intensive than creating a complete new entity?- Proposto come risposta Sven Vanoirbeek venerdì 8 giugno 2012 11:24
-
lunedì 11 giugno 2012 18:57Thanks, guys. When I implement a solution later this week or next, I will then come back and assign votes and mark answers.