Hello,

We want to disable the ability to use the "New" City/State option in the City/State lookup fields of an address. What is the best way to accomplish this?

Like 0

Like

3 comments
Best reply

Hi Allen Dsouza,

 

This button is displayed if the Lookup has an edit page. If we are talking about a selection card from a lookup, the "getSelectionControlsConfig" method in the "LookupPageViewGenerator" schema is responsible for loading the list of edit pages.

 

There is no instruction, but the "BaseLookupPageV2" schema is responsible for this page \ window, the "Add" button name is: "SeparateModeAddRecordButton", the "ActionsButton" - it's action button. You can replace and customize the visibility of these buttons as you need.

 

P.S. If you have an option to hide it without using code, I'm suggesting you to do it, just by changing "Lookup view" from "Selection window" to "List" and there will be no option to add "New" City/State. (Example attached below)







Best Regards, 



Bogdan L.

Dear Allen,

 

Thank you for your question!

 

The best way to accomplish the restrictions to add new records to a lookup without development would be to update the Object Permissions.

 

Navigate to the [Object Permissions], find there the required lookup, and disable the "Create" option for "All employees" (or for a different group if you are using them):

 

And save. Make sure to "Update the record permissions" in the Action drop-down menu.

 

The result would be like in the screenshot below:

 Hope this helps!

 

Thank you, hope you have a great day!

 

Regards,

Danyil

Danyil Onoprienko,

Thank you for the suggestion! Due to some complex security setup in the system, we are considering using code disable/hide the "NEW" option on the lookup. Is there a way to do this?

Hi Allen Dsouza,

 

This button is displayed if the Lookup has an edit page. If we are talking about a selection card from a lookup, the "getSelectionControlsConfig" method in the "LookupPageViewGenerator" schema is responsible for loading the list of edit pages.

 

There is no instruction, but the "BaseLookupPageV2" schema is responsible for this page \ window, the "Add" button name is: "SeparateModeAddRecordButton", the "ActionsButton" - it's action button. You can replace and customize the visibility of these buttons as you need.

 

P.S. If you have an option to hide it without using code, I'm suggesting you to do it, just by changing "Lookup view" from "Selection window" to "List" and there will be no option to add "New" City/State. (Example attached below)







Best Regards, 



Bogdan L.

Show all comments

Hello, 

I'm having this error message when I try to show address in map. Especially for canadian addresses, 

Like 0

Like

3 comments

Hello Sanae,

 

Seems that there should be a screenshot in your question, but there is none. And I assume that you receive "Selected address cannot be found due to the web mapping service error" error message and it is related to the fact that https://nominatim.openstreetmap.org service that is used in maps cannot find address you've specified (for example because of ZIP/Postal code). Please remove Postal code from your address and check the issue once again. Also please check if your address can be found in https://nominatim.openstreetmap.org.

 

Best regards,

Oscar

Oscar Dylan,

Thank you. I will try that.

Oscar Dylan,

I have the same problem with the addresses in Brazil, and it works fine when I remove the Zip/Postal code. Is there any setup for that, so that I can keep address with the ZIP/Postal code and prevent the OpenStreeMap service from using it for the search?

Show all comments