cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
chauhanhardik
Helper I
Helper I

Add existing records in subgrid in portal

Hi Community,

 

I'm working on a task where I need to associate a record in subgrid, and this can be achieved by adding entity form metadata. But once user clicks on Associate button, once pop-up will be comes up on screen and it should only display records which are not associated with the record on entity form.

 

Example:

In portal, You are on an account record and there's a Contacts subgrid. And in subgrid I can see below listed contacts.

1) Contact1

2) Contact2

Now I want to associate Contact3 with this account. So, I'll click on Associate button and pop up will be there to select contact, but in this pop-up I can see all contacts, I don't want to show associated contacts(Contact1 and Contact2). Except these 2 contacts should be displayed in pop-up.

 

Suggest any solution to achieve this.

 

Thanks,

Hardik Chauhan

3 REPLIES 3
OOlashyn
MVP

Hi @chauhanhardik,

There is a possibility to specify a view that is used by an associate button (as per official docs), but I don't think there is a way to define a view that will have records not associated with the current one (at least I cannot think of one right now).

----------------------------------------------------
If you find this post helpful consider marking it as a solution to help others find it.

chauhanhardik_0-1609948465805.png

Hi@OOlashyn 

yeah, we can specify view. If you check in advanced settings in Entity form metadata there's a one field "Filter criteria", maybe that can help me, but I don't know what to write in it to show only not associated records. Refer screenshot for field.

Filter criteria accept fetchxml expression (see here). But unfortunately, we cannot dynamically set properties to this filter and I cannot come up with a good idea how to exclude contacts associated with the current account.

----------------------------------------------------
If you find this post helpful consider marking it as a solution to help others find it.

Helpful resources

Announcements
Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

365 EduCon 768x460.png

Microsoft 365 EduCon

Join us for two optional days of workshops and a 3-day conference, you can choose from over 130 sessions in multiple tracks and 25 workshops.

Carousel_PP_768x460_Wave2 (1).png

2022 Release Wave 2 Plan

Power Platform release plan for the 2022 release wave 2 describes all new features releasing from October 2022 through March 2023.

Users online (5,233)