I’m trying to load the payment instrument record /...
# suitescript
s
I’m trying to load the payment instrument record / payment card / card token from the customer record. Since I can’t pull the information to a search, hence I’m aiming to go through the fields with a script and source the information to another custom field for ease of use. But I can’t seem to make it work? Is it even possible? Can’t see any info about achieving using scripting. Any function or method I can utilize?
b
if starting from a search, you should have access to the payment instruments join
s
that’s what I’m currently doing.. customer search then payment instruments join. but tricky right now part is not all customer use 1 type of payment instruments.. such as payment card / payment card token. this is not exposed on the search columns and i’m only able to match the correct record type as I am playing with a test data to load that payment records record and pull values from
b
use the payment instrument type
s
hmmm, what would that be? i can make
record.Type.PAYMENT_CARD_TOKEN
or
record.Type.PAYMENT_CARD
work but if the customer has different types then it can’t find it
b
learn how to translate the payment instrument type into a record type