Hello,
I would like to auto-populate in a choice column two different attributes' logical names based on the table name selected from the other choice column.
Example: If I selected accounts in the choice column, the field Name that I have in the form of type (choice) should be filtered and populate the attribute logical name emailaddress1 and emailaddress2, else If I selected the contacts table in the choice column it should show 'Address1: City' logical name field.
I found the Web API that should be executed to retrieve the attributes of an entity as below:
api/data/v9.2/EntityDefinitions(LogicalName='account')/Attributes?$filter=LogicalName eq 'emailaddress1' or LogicalName eq 'emailaddress2'
2. What is the function that should be used to do this filter onChange of the table name field option value?
3. To add the options retrieved from the WebAPI call based on the selected value I should use addOption to add the logical name fields to the dropdown right?
Can please someone provide an example to achieve the above requirements?
This is very similar to this thread but in that post it has some different functionalities should be used:
community.dynamics.com/.../how-to-populate-a-table-name-in-a-choice-field-using-web-api
Any help is highly appreciated.
Best regards,
EBMRay