1
votes

I created a new entity in my CRM 2016 and it has two attributes: Entity Name and Entity Attribute. Users will use drop down and select Entity name (contract, contact, lead, etc), then they will select Attribute (leadid, custom_phone, etc)

My question is: how can I build lookup field to show entity name and entity attribute for lookup.

I have also investigate to current Entity Duplication rule, and I see lookup entity name is called record type, and use F12 developer tool to see this is list of option set.

The others research is: write plugin to get entity name array and put var[] to CRM control in form via javascript onload event, but it throw error when assign var[] to CRM control.

Could you give me a key word to do this requirement?

1
Show us your code.Jeroen Heier
Hello, I refer to address to create lookup: link I write one demo javascript, then I add JS file to web resource in CRM, and put in onload event of form: function LoadEntityList() { var EntityLookup = new Array(); EntityLookup[0] = new Object(); EntityLookup[0].id = "FDF42121-B9D7-E611-B055-00155D08642C"; EntityLookup[0].name = "HHH KKKK"; EntityLookup[0].entityType = "lead"; Xrm.Page.getAttribute("entityname").setValue(EntityLookup); } But, when form is loading, I get error: invalidType when setValueDiamond Crystal
I found a equivalent question here. Maybe it is a casing problem.Jeroen Heier
Hello, in my scenarior, I want to list all entity name in CRM system at one string field, so I don't know what is the name of entityType in my lookup array?Diamond Crystal
I add one image to show one string field can lookup entity name as list. i726.photobucket.com/albums/ww265/intelcore2quad88/…Diamond Crystal

1 Answers

0
votes

You want to query all the Entities & its related attributes to list down, so users can pick & configure.

You have to research Entity metadata browser & mimic it with some console app to populate data in your custom Entity.

But you cannot populate this data into your CRM form control on the fly as the Form components belongs to Customizations & the Lookup/Picklist has to be customized & data stored in database to use readily.