Aaron McCausland
03/13/2025, 9:41 PMCeligo AI
03/13/2025, 9:41 PMAI generated answer (using internal Slack threads):In FreeMarker, the transaction form configuration fields such as formaddress are not directly available to reference like ${formaddress}, ${form.formaddress}, or ${record.formaddress}. The fields that are available for reference in FreeMarker are typically those that are directly associated with the record being processed. For example, if you're processing a Sales Order, you can reference fields like ${record.shipaddress}, ${record.billaddress}, etc. However, if you need to access fields that are not directly available, you can use a SuiteScript to add these fields to the record before it is processed by FreeMarker. This can be done in a User Event script's beforeLoad function, where you can add a custom field to the form and set its default value to the data you need. Then, in your FreeMarker template, you can access this custom field using the eval_json function, like so:
// get the custom field value with the strigified json object
<#assign customFieldObj = transaction.customFieldName?eval_json />
// reference the fields in the customFieldObj
${customFieldObj.fieldName}
******
Disclaimer:
This response was generated by an artificial intelligence assistant based on previous conversations from multiple Slack channels, and may contain inaccuracies or mistakes.
******Celigo AI
03/13/2025, 9:41 PMSlack thread 1: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.840198338
Slack thread 2: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.833808661
Slack thread 3: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.831658125
Celigo AI
03/13/2025, 9:41 PM