Answered by:
getSelectedSubTypes retrieve object attribute value

Question
-
Hello, I am using the following javascript to retrieve the selected activities with their types. The code is placed in an ISV grid button.
var selected_types= getSelectedSubTypes('crmGrid');
for (var i = 0; i<selected_types.length; i++)
{
var selType = selected_types[i];
var typecode = selType[1];
var obj = selType[3]; }
How do I retrieve an specific attribute value from the the object instance (obj)??
Thank you.
Darren Mercieca- Moved by Don ChangModerator Friday, December 3, 2010 2:29 PM (From:Dynamics CRM)
Friday, December 3, 2010 1:47 PM
Answers
-
Hello, Darren.
To get any attribute of any entity you can use Retrieve method. Check this sample - http://technet.microsoft.com/en-us/library/cc677076.aspx
Microsoft CRM Freelancer
My blog (english)
Мой блог (русскоязычный)- Proposed as answer by DavidBerryMVP, Moderator Friday, December 3, 2010 11:44 PM
- Marked as answer by darrmerc Monday, December 6, 2010 8:12 AM
Friday, December 3, 2010 9:13 PMModerator
All replies
-
Check this post http://blog.customereffective.com/blog/2009/08/fun-with-the-crm-grid-object.html
Mahain : My Dynamics CRM BlogFriday, December 3, 2010 3:42 PMModerator -
This is a very good post, thanks Mahender, unfortunately does not apply for my situation.
I need the to get the value from a custom field which I added to the email entity. Emails are listed in the activities list of (of type activitypointer), I cannot add my custom field from the email entity to the activitypointer view to be able to access the value as posted in the blog.
Therefore I wish to create an object instance (in javascript) of the selected email to access the custom field value from there. Is this possible?
Thank you.
Darren
Darren MerciecaFriday, December 3, 2010 4:04 PM -
Hello, Darren.
To get any attribute of any entity you can use Retrieve method. Check this sample - http://technet.microsoft.com/en-us/library/cc677076.aspx
Microsoft CRM Freelancer
My blog (english)
Мой блог (русскоязычный)- Proposed as answer by DavidBerryMVP, Moderator Friday, December 3, 2010 11:44 PM
- Marked as answer by darrmerc Monday, December 6, 2010 8:12 AM
Friday, December 3, 2010 9:13 PMModerator -
yes you can use retrieve method of crm service to fetch custom attribute from email entity based on the id as suggested by Andriy
Let us know if you need any other information.
Mahain : My Dynamics CRM BlogFriday, December 3, 2010 11:40 PMModerator