How to edit "editLink" in LogicHooks

Hey there !

I’m trying to customize editLink in “process_record” hook, I don’t know how to customize this link because I can’t find it in the bean like other data as the name field.

The hook is working, I just need to know how I can customize this link.

Thanks !

Hi, welcome to the Community! :tada:

To help me find that code, can you please tell me

  1. Your version of SuiteCRM
  2. Which module you’re in
  3. What exactly do you mean by the editlink
  4. Which URL does your current editlink point to?

Thanks

Hello and thanks !

  1. SuiteCRM Version : 7.11.10
  2. Well i’m searching in the search form in the header, who’s searching only in a custom module.
  3. It’s exactly the link that is printed in the tpl ListViewNoMassUpdate (line 93) in the pageData
    {if $pageData.access.edit && $pageData.bean.moduleDir != "Employees"}
  4. It point to the Edition of the value clicked

What i’d like to know it’s if I can acceess what refers to the var pageData in the Hook because this link is not in the Bean… Or if I can customize the ListViewNoMassUpdate, I don’t want to loose my mods when I’ll update suiteCRM.

Thanks !

You can look at the “assigns” in the file that calls the template, modules\Home\UnifiedSearchAdvanced.php

It uses the generic Listview template, you can see how the data is set up here

But I am not sure about how to make any custom changes you make here upgrade-safe. It might not be possible.

Yeah I already saw that file,

What I want to do is quiet simple, I just want to hide the pen edit without changing ACL because the role in cause can edit just some parts of the data, not all the data.

I thought that it would be easier just to hide the link in the logic hook that catch the process_record. But it’s not :frowning:

There’s a way to modify the tpl upgrade-safe ?

P.S : i think i just need to change this value "$pageData.access.edit " :thinking:

Try using the normal customization mechanism, an override in the custom directory.

Maybe it works, you have to check this on a file by file basis

Already tried this too.

Nothing in suiteCRM code shows that you can override the ListViewNoMassUpdate.tpl or the UnifiedSearchAdvanced who calls the template. As you already said to someone not all the CRM can be override in the custom folder.

This part seems to not be customized :frowning:

Yes. Sometimes it is quite easy to correct, just change the require_once or the command loading the TPL to use function get_custom_file_if_exists.

You can do these changes and contribute them to Core, then they become part of the next version of SuiteCRM.

1 Like