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
  • Hello,

    Could you let us know what specific version of Aras Innovator and also what browser you're using? I tested this in 12.0 SP1 using Chrome, and I didn't run into either of these issues.

    I also have some suggestions about the larger use case, but I'll post those as a reply to the original thread.

    Chris


    Christopher Gillis

    Aras Labs Software Engineer

  • Hi Chris,

    Thank you for your reply!

    I am running Aras 11SP12 and Chrome currently. Now when you mentioned browser, I tried IE just now and it worked.

    /Jimmi

Reply Children
No Data