Hi, im completely new to SuiteCRM.
Our management decided that we are gonna jump straight into version 8 and i cannot figure out how to do hooks correctly.
What i roughly need to do is hook save action (before_save), call external API, wait for response and based on response either proceed with saving the entity or cancel the save action and return custom error message to frontend.
Now i can do that in version 7 using logic hooks, SugarApplication::appendErrorMessage and SugarApplication::redirect.
But i have no idea how to do this in version 8 since the frontend is now SPA.
I’ve read through chapter on Save Handlers but didn’t get anything from it since there is no code snippet or class name.
So i guess my question is, how do i do this version 7 hook in SuiteCRM 8 properly?
Thx for any help
Have you looked at this, I this works for me at version 8.
Did you create your logic hooks under /public/legacy/custom/ folder?
I did,
So the last one i did was located here:
public/legacy/custom/modules/Users/logic_hooks.php
Some Hook types work in V8, some don’t. Which kind of hook is it?
@pgr Interesting! I haven’t come accross any that don’t work yet (not that I’ve tried every one). Is there a list or anything of hooks that only work in SuiteCRM 7? I’m guessing the process_record hook where I’ve used it to change the color if items in listview probably doesn’t work.
Yeah, it is interesting. I hope someone finds out the list and update the documentation according to it.
Yes, process_record in the new views probably doesn’t work; and I believe there were some hook for user logins and logouts that have probably also been deprecated in v8.
I never saw a full list, no…