Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Business Central forum

Get selected rows when a list page opens with all records

(0) ShareShare
ReportReport
Posted on by

I am new in Business Central. I have a contact list form opens on a page OnDrillDown, a user selects multiple contacts from the list and the selected contact email addresses are populated in DrillDown field in the text form. Now when the user again opens that contact list page, I want those previously selected rows selected on the page. 

I am passing that selected list of contacts to the list page OnAfterGetRecord() trigger, applied for loop and compared current record number with the selected list of contacts and then filtred and marked But only first one record is shown on the page and not selected.

Can somebody help me with this??

Categories:
  • Romryan Profile Picture
    on at
    RE: Get selected rows when a list page opens with all records

    Did you get the solution on this?

  • Suggested answer
    Steven Renders Profile Picture
    5,401 Moderator on at
    RE: Get selected rows when a list page opens with all records

    Maybe currpage.SETSELECTIONFILTER can help?

    docs.microsoft.com/.../setselectionfilter-function

  • Community Member Profile Picture
    on at
    RE: Get selected rows when a list page opens with all records

    Can someone else help me with this? ASAP

    Is there any other solution except Hannes Holst provided. This is a solution but I don't want to implement this way

  • Community Member Profile Picture
    on at
    RE: Get selected rows when a list page opens with all records

    Thanks but I was trying to do it without creating a new table because I don't need to save those selections anywhere. I just want to map that selection on the list page.

  • Hannes Holst Profile Picture
    5,767 on at
    RE: Get selected rows when a list page opens with all records

    Hello,

    Yes - BC is designed based on the relational database concept.
    For your requirement, normally you would have to create a new Table that links the primary contact with the other contacts.

    Like this:

    Primary Contact No. Related Contact No.
    CT001245 CT009965
    CT001245 CT008844
    CT003455 CT009133

    Or, as an alternative, you could store the "Primary Contact No." directly in the records of the related contacts (using a new field).

  • Community Member Profile Picture
    on at
    RE: Get selected rows when a list page opens with all records

    Thanks, Hannes for your quick reply.  

    You mean that something like I want, cannot be implemented in BC?

  • Hannes Holst Profile Picture
    5,767 on at
    RE: Get selected rows when a list page opens with all records

    Hello,

    An integration like you are describing is not supported by BC.
    You are describing a 1:N relation which does make other approaches necessary.

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

November Spotlight Star - Khushbu Rajvi

Congratulations to a top community star!

Forum Structure Changes Coming on 11/8!

In our never-ending quest to help the Dynamics 365 Community members get answers faster …

Dynamics 365 Community Platform update – Oct 28

Welcome to the next edition of the Community Platform Update. This is a status …

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 293,245 Super User 2025 Season 1

#2
Martin Dráb Profile Picture

Martin Dráb 231,925 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156 Moderator

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans