简体   繁体   中英

Access LogicalName from CRM 2011 Ribbon Button

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".

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.

类型名称

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM