Hello People, I have a simple workflow on the inv...
# suiteflow
a
Hello People, I have a simple workflow on the invoice record with 2 actions in total. The first action is a workflow action script which gets triggered on before load (View and Print) and does some calculation. I am storing the result of it in the parameter and then in a field of my workflow. The second action is created to get that field value and store it on the invoice record. The reason I have a field on workflow is because I am unable to set any values on invoices when the trigger is beforeLoad. The workflow is working fine but not setting the value on invoice field. Is there anything I am missing out?
m
What trigger are you suing for your second action
Do you have logging enabled?
a
Logging is enabled and the value is getting logged on invoices. I've tried second action with before load.
m
It should not be able to work before load You would need to use before submit or after submit
Or if you need the value set while the user is editing the record use before user edit
a
I don't want to edit and save the invoices. Is there any way workflow can work with before submit trigger and not having to edit it because it doesn't work on view with before submit trigger.
m
No that’s not possible
You’d have to use a scheduled workflow or script to do what you are describing
Or use a non-stored field value
a
The non stored field value won't be printed on template right? Do we have any limitations on scheduled workflow of number of records it can process? sorry if this is a basic question 😞
m
Non stored fields are printed on templates
There is no documented limitation on scheduled workflows but it’s not ideal to use for large datasets
I use Less than 10,000 records at any given run of the workflow as a general rule but that’s just my gut feeling
Large datasets should use map reduce
Also just my opinion but if you already have a custom WFA and you are running it on a schedule I would be more efficient to just make it a scheduled or map reduce script
a
My dataset is not even 1,000 invoices but the requirement is to just get the value on template. I think the safest and easiest option is to uncheck the store value checkbox.
m
Lastly if you just need to populate a non stored field value for the PDF template it’s much better to use a saved search to do your calculation then use your summary saved search to populate the field and then print it
Instead of all the scripting
a
I had the idea of saved search but the calculation requirements we have was not possible with saved search.
m
Ahh ok makes sense
Then yes try to uncheck store value and see if that works
a
The workflow is working as expected, just making sure it appears on template correctly. This was a huge help. Thank You.