Using a Set Field Value Workflow Action on Custom Forms will often result in an endless loop of the record. To avoid this, we need to apply a Workflow Condition on the Workflow Action. Kindly follow the steps below:
1. Edit the Workflow Action
2. Add the following condition:
Note: Replace Standard Sales Order with your preferred Custom Form. On my Scenario, I selected Standard Sales Order in the Selection under Parameters since this is the Form that I am using in the Set Field Value.
In the Selection column, select the Custom Form selected under Parameters (In my scenario, I used Standard Sales Order, hence the condition).
4. Click Save
With the condition, the Workflow will capture the value in the Custom Form and it will not execute again which will prevent the loop.
Let me know if you have questions.