Order of custom field updates

Hi folks,

I have a scrip that runs onCustomFieldChange, and it creates another
ticket using data from other custom fields.

eg

Payment amount - value
Payment currency - select
Payment destination - select
Payment type - select

A scrip triggers on change of Payment type, but when the new ticket is
created, amount and currency are defined, but destination is not set so
i get something like

Incoming Payment of xxxxx GBP - .

instead of

Incoming Payment of xxxx GBP - Current account

I have checked the id number of the custom fields thinking maybe they
update in id order, but Payment Type is the lowest, and Payment
Destination is not the highest. Payment type is the last in the list
that’s displayed, so I’m not sure how the order of field updates is decided.

Can anyone suggest a solution or provide any info on how the order of
field updates is defined and how i can change it (presumably by changing
field names or deleting and re-adding?)

thanks

Richard Wood (Woody)
Managing Director
Wild Thing Safaris Ltd.
PO BOX 34514 DSM
Office: +255 (0) 222 617 166
Office Mobile: +255 (0) 773 503 502
Direct: +255 657 799 468
Skype: woody1tz
http://wildthingsafaris.com

Hi folks,

I have a scrip that runs onCustomFieldChange, and it creates another
ticket using data from other custom fields.

eg

Payment amount - value
Payment currency - select
Payment destination - select
Payment type - select

A scrip triggers on change of Payment type, but when the new ticket is
created, amount and currency are defined, but destination is not set so
i get something like

Incoming Payment of xxxxx GBP - .

instead of

Incoming Payment of xxxx GBP - Current account

I have checked the id number of the custom fields thinking maybe they
update in id order, but Payment Type is the lowest, and Payment
Destination is not the highest. Payment type is the last in the list
that’s displayed, so I’m not sure how the order of field updates is decided.

Can anyone suggest a solution or provide any info on how the order of
field updates is defined and how i can change it (presumably by changing
field names or deleting and re-adding?)

thanks

Richard Wood (Woody)
Managing Director
Wild Thing Safaris Ltd.
PO BOX 34514 DSM
Office: +255 (0) 222 617 166
Office Mobile: +255 (0) 773 503 502
Direct: +255 657 799 468
Skype: woody1tz
http://wildthingsafaris.com

Hi folks,

I have a scrip that runs onCustomFieldChange, and it creates another
ticket using data from other custom fields.

eg

Payment amount - value
Payment currency - select
Payment destination - select
Payment type - select

A scrip triggers on change of Payment type, but when the new ticket is
created, amount and currency are defined, but destination is not set so
i get something like

Incoming Payment of xxxxx GBP - .

instead of

Incoming Payment of xxxx GBP - Current account

I have checked the id number of the custom fields thinking maybe they
update in id order, but Payment Type is the lowest, and Payment
Destination is not the highest. Payment type is the last in the list
that’s displayed, so I’m not sure how the order of field updates is decided.

Can anyone suggest a solution or provide any info on how the order of
field updates is defined and how i can change it (presumably by changing
field names or deleting and re-adding?)

thanks

Richard Wood (Woody)
Managing Director
Wild Thing Safaris Ltd.
PO BOX 34514 DSM
Office: +255 (0) 222 617 166
Office Mobile: +255 (0) 773 503 502
Direct: +255 657 799 468
Skype: woody1tz
http://wildthingsafaris.com

Set the scrip to run as batch. It’ll then run after all the other transactions have completed.

GarethOn 6 December 2014 18:14:04 GMT+00:00, Woody - Wild Thing Safaris woody@wildthingsafaris.com wrote:

Hi folks,

I have a scrip that runs onCustomFieldChange, and it creates another
ticket using data from other custom fields.

eg

Payment amount - value
Payment currency - select
Payment destination - select
Payment type - select

A scrip triggers on change of Payment type, but when the new ticket is
created, amount and currency are defined, but destination is not set so
i get something like

Incoming Payment of xxxxx GBP - .

instead of

Incoming Payment of xxxx GBP - Current account

I have checked the id number of the custom fields thinking maybe they
update in id order, but Payment Type is the lowest, and Payment
Destination is not the highest. Payment type is the last in the list
that’s displayed, so I’m not sure how the order of field updates is
decided.

Can anyone suggest a solution or provide any info on how the order of
field updates is defined and how i can change it (presumably by
changing
field names or deleting and re-adding?)

thanks

Richard Wood (Woody)
Managing Director
Wild Thing Safaris Ltd.
PO BOX 34514 DSM
Office: +255 (0) 222 617 166
Office Mobile: +255 (0) 773 503 502
Direct: +255 657 799 468
Skype: woody1tz
http://wildthingsafaris.com

Thank you very much Gareth. That solved the problem.

To complete this thread for others:

Old versions < 3.8.2 need

Set($UseTransactionBatch , 1);

The batch/normal setting is in the bottom right of the “applies to” tab of the custom field’s page.

It is changed on adding a field to a queue, so to change mode on an already applied queue, remove the queue, and re add it in batch mode.

w.On 06/12/14 22:01, Gareth Dawson wrote:

Set the scrip to run as batch. It’ll then run after all the other
transactions have completed.

Gareth

On 6 December 2014 18:14:04 GMT+00:00, Woody - Wild Thing Safaris woody@wildthingsafaris.com wrote:

Hi folks,

I have a scrip that runs onCustomFieldChange, and it creates another
ticket using data from other custom fields.

eg

Payment amount  - value
Payment currency - select
Payment destination  - select
Payment type - select

A scrip triggers on change of Payment type, but when the new ticket is
created, amount and currency are defined, but destination is not set so
i get something like

Incoming Payment of xxxxx GBP - .

instead of

Incoming Payment of xxxx GBP - Current account

I have checked the id number of the custom fields thinking maybe they
update in id order, but Payment Type is the lowest, and Payment
Destination is not the highest. Payment type is the last in the list
that's displayed, so I'm not sure how the order of field updates is decided.

Can anyone suggest a solution or provide any info on how the order
of
field updates is defined and how i can change it (presumably by changing
field names or deleting and re-adding?)

thanks

Richard Wood (Woody)
Managing Director
Wild Thing Safaris Ltd.
PO BOX 34514 DSM
Office: +255 (0) 222 617 166
Office Mobile: +255 (0) 773 503 502
Direct: +255 657 799 468
Skype: woody1tz
http://wildthingsafaris.com