AnsweredAssumed Answered

Validate Quote line items in sugar 7.9

Question asked by Vijayakumar S on Feb 13, 2018

Hi,

 

I am working with sugarcrm 7.9.

 

 I have created a custom dependency to validate the SLA filed in quote line item.

 

$dependencies['Products']['required_sla_on_maintenance'] = array(
'hooks' => array("edit"),
'trigger' => 'true',
'triggerFields' => array('product_templates_link'),
// Setting it to true results in page loading issue in accounts subpanel
'onload' => false,
'actions' => array(
array(
'name' => 'SetRequired',
'params' => array(
'target' => 'servicelevelagreements_products_1_name',
'label' => 'LBL_OUTCOME',
'value' => 'equal(related($product_templates_link,"include_in_maintenance_c"),true)',
),
),
),
);

 

It works as expected in edit page. But whenever I create a new quote and add a line item its not working.

 

The validation is not working when we add first quote line item.

 

 

Thanks in advance.

Outcomes