Is there a way to change the value of a Transaction custom field?
Moderators: alexandre, hugo, rmvanarkel
Is there a way to change the value of a Transaction custom field?
I was wondering if there is a way to change the value of a transaction custom field on a completed transfer through the scripting interface.
Re: Is there a way to change the value of a Transaction custom field?
You can manually change custom field values of a transaction like this:
It will be persisted on commit.
Note that in case OpenSearch is used, it won't be automatically reindexed (would need to be done with transactionSearchHandler.index(transaction).
Code: Select all
def fields = scriptHelper.wrap(transaction)
fields.customFieldInternalName = newValueNote that in case OpenSearch is used, it won't be automatically reindexed (would need to be done with transactionSearchHandler.index(transaction).
Luis Fernando Planella Gonzalez
Cyclos development team
Cyclos development team