Using a Workflow, I transform a Custom Transaction...
# general
e
Using a Workflow, I transform a Custom Transaction (Type: Purchase) into a Vendor Bill. I use the option to "`REDIRECT WITHOUT SAVING`". This opens the Vendor Bill with with data from the Custom Transaction (including the items) already populated, ready to make minor changes and save the form. The items in the Bill needs the Tax Code, but this field is not in the Custom Transaction (there is no option to set it). Even if I set a custom column in the Custom Transaction with a List type of Tax Code, the value doesn't translate to the Vendor Bill when the unsaved form opens (in the end, the fields are not really the same, as are the item, quantity or amount between both transactions). Before saving the new Bill, I seem unable to use Workflows or Scripts to access o modify its (already populated) lines. So I'm stuck. How to set the Tax Code value in the Vendor Bill form, when the form is already populated with items and before it's saved?
r
You can create a custom button which does the same thing through script. Then you can load your custom transaction record and compare each line with your vendor bill record in the script. With which you can update your quantity, tax code, etc in vendor bill with what you have in your custom transaction. Not sure how to achieve the same using a workflow.
e
@raghav The Vendor Bill is open in edit mode, populated, before saving it. In this moment the Bill doesn't exist. Is it possible to iterate and modify the item lines in the Bill in this moment?
r
I have never really tried in the UI. Mostly I had created MR to automate such process. But I believe a user event to display a button and a client script which gets called on a button click to meet your needs will do the job.
m
Potentially with action script in your wf
r
As suggested above, Workflow action script will probably be best for your requirement, it didn't even come to my mind.