locked
Update the field using both Javascript and Workflow to gether RRS feed

  • Question

  • Hello All,

    We have a workflow and Javascript in one entity and below is the description of the issue.

    Workflow will run in both on save of record as well as on change of one field(Lets Say XYZ).

    Javascript is in onchange of attribute(XYZ field). In the javascript as per business functionality we are force-submitting the some values(Lets Say ABC). Hence while changing the value in ABC field and saved the record workflow is executing multiple times.

    we want to restrict multiple workflow executions. Can any one help me to solve the above scenario.

    Thanks

    Kumar R

    Thursday, February 27, 2014 2:59 PM

All replies

  • Hi

    Did you notice how many times workflow was executed for one change ? 2 or 3 or more ? Any specific count or it is a different number all the times ?

    The reason I think is: 

    You need to only trigger workflow on change of field. (In case of workflows, onchange is checked when you save a record. Thats why it is triggered multiple times).

    Also ensure that you are doing stop workflow step at end of workflow. This prevent un-necessary iterations and workflow going into infinite loop.

    Thursday, February 27, 2014 3:33 PM
  • Hi, You are correct. I already specified on stopping the workflow at end. Total 3 times workflows are getting created and running in background. Let me know how to prevent the issue. Regards, Kumar R
    Thursday, February 27, 2014 6:50 PM