How to set metadata from transition custom field?

During a Workflow transition I collect the ‘check number’ as a custom field.
How can I grab this data and set it to document’s Check Number metadata once the state transitioned to enters?

Take 5002 and set it to Check Number metadata.

I am assuming that workflow_instance.get_last_transition (Mayan-EDMS/mayan/apps/document_states/models/workflow_instance_models.py at 71788a5196547c61c1ee457ba386cfee98b77daf · mayan-edms/Mayan-EDMS · GitHub) is a WorkflowInstanceLogEntry (Mayan-EDMS/mayan/apps/document_states/models/workflow_instance_models.py at 71788a5196547c61c1ee457ba386cfee98b77daf · mayan-edms/Mayan-EDMS · GitHub).

So maybe {{ workflow_instance.get_last_transition.extra_data.invoice_payment_number }} ??? @roberto.rosario

Here is a Knowledge base tutorial on achieving this:

Using Workflow Forms to Fill Out Document Metadata

3 Likes

Excellent, thank you. workflow_instance.get_runtime_context.?

This topic was automatically closed 12 hours after the last reply. New replies are no longer allowed.