I am looking for a simple example for how to pass variables through COTG
The examples I am coming across all seem to have Record ID set to 0
Scenario: I am printing a customer receipt that needs to be signed. I am saving the customer receipt using “CustomerNo”_“TransactionNo”.pdf to a temporary directory
I want to pass 2 variables, the customer number and the transaction number, to COTG so I can dynamically show the Receipt in COTG and then pass those variables back to my workflow so I can place the signature on the document for further processing.
My roadblock seems to be getting those variables into my COTG template
When I test the template in Designer with sample data it works fine but I cannot seem to get it to work in my workflow
I did as you suggested and I am still running across the same issue. Works in Designer but not in my workflow.
I’m thinking the issue is around RecordID = 0 in Create Web Content in my workflow. Is there a way to determine the RecordID from the datamapping in the workflow so that I can pass that record through to my COTG form?
Unless I am way off in left field on this and there is an easier method. Then I am all ears.
RecordID = 0 is most likely the problem. This generates an empty data record for rendering static web pages (e.g. no personalized data). I assume your Execute Data Mapping step outputs IDs to metadata. In that case you should be able to retrieve the first record using the following:
GetMeta(_vger_record_id[0], 10, Job.Group[0].Document[0])