Iwo Kucharski
Iwo Kucharski

Reputation: 3825

Field customization - module (SugarCRM)

I want to add an icon near phone_no in phone field. It should have a jQuery click() action. It's necessary to create new module to install or I just have to add new hook to existing field (if hook - where to add it)? I found file /custom/modules/logic_hooks.php but when I changed it (added line):

$hook_array['after_ui_frame'][] = Array(12, 'Description', 'custom/modules/MyModule/mymodule.php','MyModule', 'showIcon');

Some pages fired strange popup (lots of \t\t\t\n\n\n etc). Could someone give me a tip how to do it properly? I'm totally new user of SugarCRM

Upvotes: 0

Views: 319

Answers (2)

Iwo Kucharski
Iwo Kucharski

Reputation: 3825

Ok, I found the solution. I can add a field or customize existing one by editing the detailviewdefs.php. I made new field and added onclick action in 'custom_code'. Thank you for your effort, Rupesh.

Upvotes: 0

Rupesh Singh
Rupesh Singh

Reputation: 92

after_ui_frame logic hook fire every page load. while you render studio the hook is fired and html is not properly render.

apply check for particular module so your hook code execute only for given module.

if(checkmodulename for you module){
//hook code here...

}

Upvotes: 1

Related Questions