I need help with a workflow to change the form acc...
# general
m
I need help with a workflow to change the form according to the client's subsidiary. When I create an invoice from sales > create invoice and select my customer, the form fits fine( after field edit) But when I'm on the customer file and I click on invoice to create an invoice, the form does not adapt to the customer's subsidiary how can I configure my workflow so that the 2 invoice creation possibilities can have the right form depending on the subsidiary
m
When you say "I click on Invoice" from the customer file, is that a custom button you added via WF to create an Invoice?
Or do you mean creating an Invoice using the native Quick Add menu on a customer record?
m
Yes with quick add
m
The only way I have found to do this is to do a Set Field Value action on the Custom Form field but use Before User Edit as the trigger
It's a little wierd but if you try to use an on Entry or Before Record Load trigger it never seems to work correctly
m
I tried with the before user edit But the page reloads constantly
m
do you have any conditions on your action?
m
for the moment my workflow is configured with set field value after field edit (as soon as I select a customer) and if the customer's subsidiary = Japan then the form is invoice Japan. But if I also use another set field value before user edit , my page reloads indefinitely
m
I see, have you tried removing that Set Field Value after field edit and just use the Before User Edit?
It seems like the 2 together are creating a loop
m
yes but if I remove the set field value after field edit, if I modify the customer and the subsidiary, the form will not change
m
Ok that makes sense......it seems like we need to put a condition on the After Field Edit action of Custom Form is NOT Japan form
or something like that
that may stop the loop
Or somehow validate the correct form is being used when triggering the After Field Edit, so some big condition link (Customer.Subsidiary = Japan and Custom Form is NOT Japan form) OR (Customer.Subisidary is NOT Japan and Custom Form IS Japan Form)
That way the After Field Edit action will evaluate the Customer Subsidiary/Custom Form combination and if it is incorrect then the action will fire, however, if it is the correct combination then the action will be ignored
m
I finally added an extra condition on the before user edit too and it seems to work
Thank you for your help
m
no problem, glad it worked