0
votes

I'm creating a custom ribbon button in CRM 2011 that creates a trigger entity activating a plugin. I'm trying to transfer data into the plugin by creating fields inside the trigger entity. One of the fields I'm trying to fill is the Logical Name of the selected entity (I'm trying to make this work universally which is why I'm not directly specifying a single entity). If two different entities on the homegrid are selected (and they're the same entity type) how can I access their logical name using jscript?

I've tried using the crmparameter SelectedControlSelectedItemReferences and then calling references[0].LogicalName but this returns "undefined".

1

1 Answers

1
votes

Can you access F12 developer tools with IE? If you can, you can add a breakpoint in your code in the method that the button executes. Once the execution is paused, examine the value of SelectedControlSelectedItemReferences and from there, you will be able to correctly identify the property that represents the EntityReference LogicalName property.

You can use this method to identify the characteristics of any unknown method or property in javascript.

TypeName