I want to have alert notification on logic hook.

I have gone through many questions and posts but i didn't find the solution for sugar 10.3 (Enterprise Edition)

class save_customer
{
/*
*$bean :
*$event :
*$arguments :
*/
function save_customer($bean, $event, $arguments)
{

//Check If Customer ID present or not
$customerID = $bean->customer_id_c;
if ($customerID == "")
{

//Need to show alert message ("Customer ID empty")
}

}

Please suggest me some solutions.

Parents Reply
  • Hi Gautam,

    You cannot throw an alert using the logic hooks. Logic hooks are not meant for it. It allows you to append actions to system events such as when creating, editing and deleting records, etc. If you want to do any validation like this you have to extend your record view and create a view and write the code in js. Please go through this link as Andre Lopes suggested. 

    Hope this helps.

    Thank you

    PK,

    Senior Solution Engineer,

    www.bhea.com

Children
No Data