Some records in look up are already selected by default

Hi Community,

 

I want to open a look up which by default has already selected records, please see image below. Lets say, I have look up "Main Activity". I want record "Main Activity A" by default was checked upon opening the look up window. 

Thanks

 

 

Like 0

Like

1 comments

Dear Fulgen,

In order to add such functionality you will need to proceed with custom development to the basic functionality.

Overall, this would be a major development, and we highly do not recommend to interfere with basic functionality, since it can caused unexpected system behavior. 

If you decide to go for development within the system, you will need to do the following:

- Add the LookupUtilitiesV2 to the dependencies of the schema, where lookup is located;

- Override the basic schema BaseLookupPageV2;

- BaseLookupPageV2 contains various methods, which are responsible for opening of the lookup and processing user actions. It also contains an attribute  'SelectedRows', which you might need in your development.

- Override the basic method opening the lookup, so to retrieve the collection of objects, before they are rendered on the page. Modify or add the needed object to selected rows. 

- Add the clause, that your functionality will only execute for particular schema/lookup/section/page, since BaseLookupPageV2 is a parent schema for other lookups in the system.

Regards, 

Anastasia

Show all comments