SugarCRM 5.5.0
Hi,
Is there a way to fire a hook when a subpanel has been modified?
I need to perform an action whenever accounts or leads have been added to the target list subpanels.
Cheers
SugarCRM 5.5.0
Hi,
Is there a way to fire a hook when a subpanel has been modified?
I need to perform an action whenever accounts or leads have been added to the target list subpanels.
Cheers
It can be accomplished through logic_hook process_record.
Cheers
André Lopes
DevToolKit / Project of the Month - June 2009
Lampada Global Services- Open Source Solutions
Avenida Ipiranga, 318
Bloco B - CJ 1602
São Paulo, SP 01046-010
Brazil
Office: +55 11 3237-3110
Mobile: +55 11 7636-5859
e-mail: andre@lampadaglobal.com
Lampada Global delivers offshore software development and support services to customers around the world.
Lampada is proud to be a SugarCRM Gold Partner, revolutionizing Customer Relationship Management.
I DO NOT answer questions through PM and Email. If you need some help post your question into SugarForum.
Is the hook file suppose to sit somewhere else? I have it currently sitting in custom\modules\ProspectLists but it doesn't work there. When the hook is after_save, then it works fine. But I need it to fire when the subpanels have been modified.
Thanks for the help
Exactly what do you want to do?
If you want to fire a custom function when a record on subpanel is saved you can use the before_save logic_hook, but you should need to check if this record is been saved from a subpanel or from any other view.
Inside the logic_hook function add the following code:
Then try to edit or create a record from subpanel and check the request attributes;PHP Code:echo "<pre>";
print_r($_REQUEST);
echo "</pre>";
die();
The try to create a record from its own module and check the request.
Try to identify which attributes are available only on subpanel event.
Cheers
André Lopes
DevToolKit / Project of the Month - June 2009
Lampada Global Services- Open Source Solutions
Avenida Ipiranga, 318
Bloco B - CJ 1602
São Paulo, SP 01046-010
Brazil
Office: +55 11 3237-3110
Mobile: +55 11 7636-5859
e-mail: andre@lampadaglobal.com
Lampada Global delivers offshore software development and support services to customers around the world.
Lampada is proud to be a SugarCRM Gold Partner, revolutionizing Customer Relationship Management.
I DO NOT answer questions through PM and Email. If you need some help post your question into SugarForum.
Basically what I am trying to achieve is to make sugar fire an action when accounts or leads are added to the target list. When you create a target list you can add leads, contacts and accounts in the subpanel of your new target list.
I need sugar to do an action when those accounts are added to the target list, not when the target list is first created or edited or whatever. Only when accounts are added to a target lists subpanel.
So I've created a target list, named it 'Test'. I then go into that target list and in the subpanels I click on the select button under the 'Accounts' subpanel and select the records that I want to add to that target list. Once it has added the accounts, I need to fill out a field for each of those accounts in each account, or email them; doesn't really matter what the action is. I just need to know how to fire the hook. after_save is only if I edit and save the target list so that doesn't work.
Hope you can help. Thanks!
Unfortunately after_save or before_save logic_hooks are not triggered by "Creating a Relationship between 2 existing records".
Unfortunately there is no logic_hook to trigger such event, so you should to either:
- Override the method "save_relationship_changes" on every modules displayed on subpanel or;
- Create pseudo modules, which extends the default ones, in order to be able to implement this method on pseudo module classes. The appropriate updates should be applied on extended layoutefs of Prospect Lists.
Cheers
André Lopes
DevToolKit / Project of the Month - June 2009
Lampada Global Services- Open Source Solutions
Avenida Ipiranga, 318
Bloco B - CJ 1602
São Paulo, SP 01046-010
Brazil
Office: +55 11 3237-3110
Mobile: +55 11 7636-5859
e-mail: andre@lampadaglobal.com
Lampada Global delivers offshore software development and support services to customers around the world.
Lampada is proud to be a SugarCRM Gold Partner, revolutionizing Customer Relationship Management.
I DO NOT answer questions through PM and Email. If you need some help post your question into SugarForum.
It's a shame there's no hook for that. But thanks for the help. Will try solving it using your suggestions and will post outcome.
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks