[4.0.4] Form Submission from a button Script

Posted by Meryk on 04-Jan-2016 04:25

Hello,

I have a button on a Edit page, and I am running client-side JavaScript from it.

Here is the bit of code I have in the Button Script :


rbf_runTrigger('activity', '{!id}', 'workflowStatusCompleted', true, function callback(){
  $('#theForm').submit();

});

The issue is that the form is submitted (Save is clicked) without the trigger 'workflowStatusCompleted' running. So basically I have a status that is not changing..

Before 4.0.4, I was doing $('input[value="Save"]').click(); instead of   $('#theForm').submit(); and it was both running the trigger and clicking save/submitting the form in this order. Now in 4.0.4 the save button is an 'a' and no more an input, the click() method is not working.

Any suggestions please?

Thanks,

Meryem

Posted by Meryk on 05-Jan-2016 05:43

Hi,

I found an easier solution for that, by doing rbf_setPicklistCode() on the status itself and then simply submitting the form.

Thanks

Meryem

All Replies

Posted by Meryk on 05-Jan-2016 05:43

Hi,

I found an easier solution for that, by doing rbf_setPicklistCode() on the status itself and then simply submitting the form.

Thanks

Meryem

This thread is closed