Can we override/remove link on reference lookup window in edit mode?

  • 1
  • Question
  • Updated 4 years ago
Hi,

I am trying to get the user select Product from the lookup window. I was able to remove the hyperlink of product field on read mode, but in edit mode on selection of product name on lookup window, it navigates to standard Salesforce page (it works fine when we click on select icon against each product names, but on click on product name itself it navigates to standard salesforce page).

Is there a way to override/remove link (of Product) on lookup window. I do not want to display lookup as picklist because I want users to search by product name and then select from the lookup window.

I did as below but with no luck:

var field = arguments[0],    value = arguments[1],
    renderer = skuid.ui.fieldRenderers[field.metadata.displaytype],
    mode = field.mode;
// Get the pricebook entries model we are using for the renderer
var pricebookEntriesModel = skuid.model.getModel(field.options.optionmodel);
if (mode == 'edit') {
    // Specify that we want to display our field as a Picklist
    field.options.type = 'CUSTOM';
    renderer[mode](field,value);
} else {
    
     field.element.append(skuid.$('<div>').addClass('nx-fieldtext').text(field.model.getFieldValue(field.row,skuid.utils.getFieldReference(field.id,field.metadata))));

}
Photo of Pavithra

Pavithra

  • 440 Points 250 badge 2x thumb

Posted 4 years ago

  • 1
Photo of Rob Hatch

Rob Hatch, Official Rep

  • 44,006 Points 20k badge 2x thumb
We are working to allow you to remove links from name fields,  as the scenario you describe is very painful.  

We don't currently allow you to manipulate the fields in the lookup popups,  so you cannot write a custom field renderer there.  Sorry. 

In the mean time here is a workaround that feels like a hack.   You can make a formula field in your sOjbect that translates the name field into a string (text only field).   Then you can select this field to be displayed in your search popup. Because its just a string,  it won't have a link with it. 
Photo of Ben Hubbard

Ben Hubbard, Employee

  • 12,490 Points 10k badge 2x thumb
I believe this has been fixed in the latest patch of Superbank (Patch 8).
Photo of Rob Hatch

Rob Hatch, Official Rep

  • 44,006 Points 20k badge 2x thumb
Yes it has!  Thanks a bunch!