Показать сообщение отдельно
Старый 17.04.2008, 11:41   #7  
koalex is offline
koalex
Участник
 
26 / 20 (1) +++
Регистрация: 16.01.2008
Можно это сделать. Вот, читайте:

When I open a Marketing List and click on Members, a view of the lists
members is displayed.
I would like to add a column to the list from the Contact record. Is this
possible?

Thanks



You sure can, guys! You just have to use the same hack we used to
modify views in 1.2...
To modify the Marketing List Members view for a Contact list, do the
following:

1) First, notice that there are three types of Marketing Lists: those
that hold Contacts, Accounts, and Leads. Make a note of which type you
are looking at. Also notice that in the upper right there are three
views: All Members, Active Members, and Inactive Members. (So, there
are NINE views you can possibly modify - just make sure you know which
one you are trying to modify). I am going to modify the All Members
view for Contacts in this example.

2) In SQL Query Manager, in the MSCRM DB, Run:

select * from savedquerybase where name like '%mem%'

This will give you the views you care about: for example, you can see
three views with "All Members" as the name. If you scroll over to the
right 5 columns from the name, you'll see a field called
"ReturnedTypeCode". It will have values of 1 (Account), 2 (Contact),
or 4 (Lead). (These correspond to the ObjectTypeCodes of these
objects.)

3) Find the name of the view you want to modify, with the proper
ReturnedTypeCode (I am modifying the All Members view for
REturnedTypeCode of 2). Scroll all the way left, and copy (CTRL/C) the
GUID in the SavedQueryID column that is associated with the Name and
REturnedTypeCode you want to modify.

4) Go to Settings / Customize Entities, double-click on any
customizable entity (e.g. Contacts), click on Forms and Views, pick any
view. This will open the view editor for you.

5) Hold down the CTRL key and press the N key. This will open up a new
window with the URL address viewable. Select the GUID at the end of
that line, leaving the { and } brackets, and hit CTRL/V to paste the
contents of the GUID you copied in step 3 into this URL. Press the
Enter key. This will bring up the view you want to modify.

6) Add Columns (I added Parent Customer, so I can view the company name
on this list), Configure Sorting, etc. as usual, and Save and Close.
Click Yes when it asks if you want to close the window.

7) In the Customize Entities view, under More Actions, select Publish
All Customizations.

8) Go to Marketing \ Marketing Lists, and open any list that has the
word "Contact" in the second column (Marketing List Member Type).
Click on the Marketing List Members tab. As the All Members view
displays by default, you will now see the Parent Customer field (or any
others you have added) in that view.

Repeat steps 3-6 for each view you want to modify, and you should be
all set... (I'm on a roll today ;-)

Единственное, что нужно учесть - это то, что для русскоязычной версии CRM запрос из п.2 должен выглядеть немного по-другому - вот так:

select * from savedquerybase where name like '%уча%'

Вкратце здесь суть в том, что все представления хранятся в таблице savedquerybase, и нам нужно просто найти GUID нужного представления, забить его в адресную строку формы редактирования представлений, и редактировать его уже обычным способом. Почему разработчики закрыли настройку этих представлений из нормального интерфейса - мне абсолютно не понятно.
За это сообщение автора поблагодарили: Tony Green (1), Сабитов Андрей (1), SeregaK (1), Артем Enot Грунин (2), e.pasechny (1), Timich (1).