Question

Conditionally disable one record page on Lookup modal box

Hi Community,

 

I have to remove one record page on Contact Lookup modal box (button New menu items -> Customer). This is a standard lookup on UserPage. But of course "Employee" record page should stay.

 

How can i do this ?

 

I know from some post that there is "excludeTypes" property on lookupconfig but it doesn't work for me (maybe this property is deprecated or id provided in array are not ContactType id's).

 

Second thought was to use "hideActions" property but whole New button menu will be removed from page.

 

Can i somehow replace function in LookupPageViewGenerator (eg. in getSelectionControlsConfig add some logic) ?  In browser debugger i can remove one item from array and it's works but i don't know how to implement this logic in package.

 

Best Regards,

Marcin

Like 0

Like

2 comments
Best reply

Hi Marcin,

 

Indeed you need to override the logic of the LookupPageViewGenerator and its getRequiredPages method that generates all the pages that appear in the "New" button. To do that you can either replace a module as its described here or you can override the method directly in the application binary files (the LookupPageViewGenerator.js file is located at root\Terrasoft.WebApp\conf\content. If this is a cloud-based app you can contact us at support@creatio.com, provide us with the file that already contains needed changes and directory where it should be placed. Once done the application should be restarted with Redis flush and the source code should be generated for all items and all items should be compiled).

 

Best regards,

Oscar

Hi Marcin,

 

Indeed you need to override the logic of the LookupPageViewGenerator and its getRequiredPages method that generates all the pages that appear in the "New" button. To do that you can either replace a module as its described here or you can override the method directly in the application binary files (the LookupPageViewGenerator.js file is located at root\Terrasoft.WebApp\conf\content. If this is a cloud-based app you can contact us at support@creatio.com, provide us with the file that already contains needed changes and directory where it should be placed. Once done the application should be restarted with Redis flush and the source code should be generated for all items and all items should be compiled).

 

Best regards,

Oscar

Hello Oscar,

 

Currently i has redesigned solution, so its works in different way. But i will keep in mind Your post in future design.

 

Best Regards,

Marcin

Show all comments