Quantcast
Channel: Microsoft Dynamics CRM Forum - Recent Threads
Viewing all articles
Browse latest Browse all 46379

String text field can lookup entity list in dynamics CRM

$
0
0

Hello all,

I create new function to setup number sequence for entity in CRM System, I create new attribute is called Entity Name (string data type, mean which entity you want to generate number), and other attribute is called Entity Attribute (string data type, mean which attribute you want to assign number automatically) 

My question: I don't know how to create lookup to list all entity name and entity attribute of entered entity name.

I do research and found some ways but I still can not do and get some problem:

1. Can add javascript at onload event in form. Javascript will get Entity name via plugin as ODATA, and build array var[], then set arrary to control.

=> Question:

- For array, as I research must have 3 information: id, name, entityType, but for this scenario, we don't lookup to specific entity like lead, contract, contact, so how to fillin this value ?

- When I setValue array to control, it throw error invalidType ?

function LoadEntityList()
{
     var EntityLookup = new Array();
     EntityLookup[0] = new Object();
     EntityLookup[0].id = ?? ; //If I build lookup to specific data like Lead, Contact, I will have entity Id, but now we get Entity name so what value id here ?
     EntityLookup[0].name = "lead"; //May be name of entity
     EntityLookup[0].entityType = "lead"; //May be name of entity
     Xrm.Page.getAttribute("entityname").setValue(EntityLookup);
}

2. Base on form Duplicate rule setup, I use F12 Tool how to bind entity name as list at attribute Base record type

First thing: Base record type is single line or text (it is not a lookup)

Second thing: use F12, I can set list of option as select

Third thing: check javascript in form, and don't see any javascript and onload event method in this form

=> Question:

- How can Duplicate Rule form load entity name as list at Base record type ?

Thanks you so much for any comment and guide for me.


Viewing all articles
Browse latest Browse all 46379

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>