Field event "onChange" triggers method twice, bug?

オフライン

Hi,

I have created a field event onChange, see picture below:

It worked well with following exceptions:

1. The confirm dialog appears twice each time dlv_assigned_to field is changed, does it need a delay somehow?

2. When the dlv_assigned_to changes by search dialog (... button), the confirm dialog will not appear. Bug?

The method code looks as following:

var dlvAssignedTo = document.thisItem.getProperty('dlv_assignedto');

if (dlvAssignedTo)
{

if (!top.aras.confirm('Do you want to send mail to DLV Assigned to User?'))
{
return;
}
var callServerMethod = aras.IomInnovator.newItem('Method', 'DLV_ActionReq_Assignment');
callServerMethod.setProperty('dlv_assignedto', dlvAssignedTo);
callServerMethod.setProperty('item_number', document.thisItem.getProperty('item_number'));
var result = callServerMethod.apply();
if (result.isError())
{
aras.AlertError(result.getErrorString());
}
else
{
aras.AlertSuccess('Email sent successfully.');
}
}

Related post:

https://community.aras.com/f/development/34948/send-email-to-task-assignee-by-field-event

Parents Reply Children
No Data