Skip to main content

Notifications

Announcements

No record found.

Customer experience | Sales, Customer Insights,...
Unanswered

How to get entity type from multitargeted entity lookup in PowerApps portal using Javascript

Posted on by
We are rendering a case in powerapps portal which has a lookup of customer type(it is pointing to both account and contact). In our scenario we want to restrict a user to select account from the portal form and for that we are trying to write a javascript on change of that field and trying to get the type associated with that lookup value.
Below is the javascript we're trying to write but unfortunately we are unable to get the type.
 
$('#customerid').change(function () {
// Log the event to the console for debugging
console.log('Change event triggered.');
// Get the selected entities
var selectedEntities = $('#customerid_entityname').val(//);
 
 
Is there  anything wrong in the script or is their any other way to find out the type of the entity.
 
 

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Tips for Writing Effective Suggested Answers

Best practices for providing successful forum answers ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,280 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,214 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans