function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
vinothvinoth 

How to get "new" button in lookup window for custom object ?

I need to get new button in lookup window for custom object.

Ispita_NavatarIspita_Navatar

Hi,

           Can you elaborate more so that we can resolve it properly which new button you are asking about??

IspitaIspita

Hi vinoth,

If you want to add a new button , in the window which opens when we clkick on lookup icon - salesforce does not expose that screen for customization.

Else if you want to have a new button in place of the lookup icon which acts as a clickable element for that you need to custom build your standard page functionality.

 

vinothvinoth

Actually I have created one custom object having lookup relation with Account standard object. When i click the lookup icon in the lookup window i get a "new" button along with the "go" button. But if i create this lookup relation with any custom object, i dont get the " new" button. only the " go" button i get. What I have to do to get the "new" button in the custom object lookup Window?

IspitaIspita

Unfortunately if you are using the standard functionality you cannot do much..... Only option will be to custom build the whole thing...

 

Milan SanghaniMilan Sanghani

It is not possible to add new custom button on standard lookup window for custom object. you can design customized lookup window for that, and in that we can give new button functionality.

 

Thanks,

Milan Sanghani

Milan SanghaniMilan Sanghani

Or else You can go with this Process.

 

How to create new records from a lookup search?

 

Frustrated of not finding the person you're looking to add through a lookup search and having to exit out of the search to create that record?  Well now you can create a link in the lookup search that will allow you to create that record from the search itself.

To best explain this, lets pretend that you want to be able to create a new Account through any lookup field. A likely reason would be that you're entering a contact or an opportunity and you're trying to link the contact or opportunity to an Account, however their account doesn't exist so you want to create one.

First, you will want to create a custom formula text field on the Accounts object (or the object that you wish to create a new record for, whatever it may be). 
Go to: | Setup Customize (Whatever Object) | Fields New Formula Text |

Your formula should look something like this:

HYPERLINK("https://na5.salesforce.com/001/e?retURL=%2F001%2Fo", "Create a New Account")

Note: The URL that you want to use is the same URL of the page when creating a new account.  This URL will vary per org and per object.  To get the appropriate URL, go to the tab of the new record you wish to create and click to create a new record for that object.  When you're prompted with the typical new screen for a record (with essentially no information and all editable fields) this is the URL you want to use.  

The text in the quotes is how your Hyperlink will appear.

Save the field and DO NOT ADD IT TO THE PAGE LAYOUT.  It is not necessary for this field to be added to the page layout.

Next, you want to add this to the Search Layout for Lookup Dialogs.  
Go to: | Setup | Accounts | Search Layouts | Lookup Dialogs | and find the Custom Formula field that you just created and add it.

You will now be able to create a new Account from any Account Lookup field by selecting the exposed link(your custom formula text hyperlink) from the lookup search.

 

Thanks,

Milan Sanghani

Brooks Bruce 15Brooks Bruce 15
Thanks, Milan. I followed your steps but the new hyperlink formula field is not a hyperlink for some reason, see screenshot:
User-added image

No syntax errors on the formula field, though.
User-added image
Thoughts? Any help greatly appreciated. Thanks for your time.

Best,
Brooks
smriti kumari 23smriti kumari 23

Hi Milan/Brooks Bruce 15,

Even I got the same error. Milan,can you tell us the steps in case we missed anything?

Thanks,
Smriti