Показать сообщение отдельно
Старый 21.07.2012, 18:12   #1  
Blog bot is offline
Blog bot
Участник
 
25,475 / 846 (79) +++++++
Регистрация: 28.10.2006
Leon's CRM Musings: Using Dialogs for Multi-Select Option Sets
Источник: http://leontribe.blogspot.com/2012/0...ct-option.html
==============

Personally, I am not a fan of multi-select options sets (picklists). The reason is, generally, the response is stored as a comma-delimited text field, making reporting do-able but not elegant. The option I steer towards is multiple two value option sets (which, arguably, is also inelegant) or a child entity.

However, the requirement is something that comes up every now and again and here is a codeless solution which gets you there via dialogs.



The Dialog

Here it is:



In this case I am running the dialog off of the Contact record and four questions are asked, all within the same page. When answered, these are used to update the Contact record.

The Prompt and Responses

Here is the first one:



The only thing out of the ordinary here is me changing the Value for the Response Labels. If the answer is ‘Yes’, the value relates to the question; if it is ‘No’, I make the Value also ‘No’.

Updating the Contact

Once all of the responses have been captured, we update the contact record.



The Response Values defined before now populate the Description box (although any text field will be fine).

Seeing it in Action

From a contact record (we cannot run the dialog against multiple records at once, unfortunately) we select the Start Dialog button at the top



and select the dialog of choice.



This is a little awkward but can be improved with a little code and a button, if required.

The dialog opens:



You pick your values, close the dialog and the contact is updated.



Conclusions

If you need a codeless multi-select option set (and many two option fields or a child entity is not an option), this will get you there. It is also completely configurable without having to mess with jscript which, for me, is certainly a bonus.

Enjoy.




Источник: http://leontribe.blogspot.com/2012/0...ct-option.html
__________________
Расскажите о новых и интересных блогах по Microsoft Dynamics, напишите личное сообщение администратору.