Credit Card Refund

The credit card refund record is available only when a credit card account exists in the system. For information about creating a credit card account, see Creating Accounts.

For help working with this record in the UI, see Issuing Credit Card Refunds and Credit Card Refund Import.

The internal ID for this record is creditcardrefund.

See the SuiteScript Records Browser for all internal IDs associated with this record.

Note:

For information about using the SuiteScript Records Browser, see Working with the SuiteScript Records Browser in the NetSuite Help Center.

For information about scripting with this record in SuiteScript, see the following help topics:

Supported Script Types

The credit card refund record is scriptable in server SuiteScript only.

Supported Functions

The credit card refund record is fully scriptable — it can be created, updated, copied, deleted, and searched using SuiteScript. It can also be transformed.

Usage Notes

The script user must have the Credit Card Refund permission with Full permission level.

Code Samples

The following sample shows how to create a $30 credit card refund.

          var ccRefund = record.create({
    type: record.Type.CREDIT_CARD_REFUND,
    isDynamic: true
});
ccRefund.setValue({
    fieldId: 'entity',
    value: '4'
});
ccRefund.setValue({
    fieldId: 'account',
    value: '128'  // Account must be created before (Type = Credit Card)
});
ccRefund.setValue({
    fieldId: 'exchangerate',
    value:'1.00'
});
ccRefund.setValue({
    fieldId: 'postingperiod',
    value: '45'
});
ccRefund.setValue({
    fieldId: 'memo',
    value: 'MEMO'
});
ccRefund.setValue({
    fieldId: 'class',
    value: '1'
});
ccRefund.setValue({
    fieldId: 'department',
    value: '1'
});
ccRefund.setValue({
    fieldId: 'location',
    value: '1'
});
ccRefund.setSublistValue({
    sublistId: 'expense',
    fieldId: 'account',
    line: 1,
    value: '58'
}); 
ccRefund.setSublistValue({
    sublistId: 'expense',
    fieldId: 'amount',
    line: 1,
    value: '30.00'
}); 
ccRefund.setSublistValue({
    sublistId: 'expense',
    fieldId: 'memo',
    line: 1,
    value: 'MEMO2'
}); 
ccRefund.setSublistValue({
    sublistId: 'expense',
    fieldId: 'class_',
    line: 1,
    value: '1'
}); 
ccRefund.setSublistValue({
    sublistId: 'expense',
    fieldId: 'department',
    line: 1,
    value: '1'
}); 
ccRefund.setSublistValue({
    sublistId: 'expense',
    fieldId: 'location',
    line: 1,
    value: '1'
}); 
ccRefund.setSublistValue({
    sublistId: 'expense',
    fieldId: 'customer',
    line: 1,
    value: '3'
}); 
ccRefund.setSublistValue({
    sublistId: 'expense',
    fieldId: 'isbillable',
    line: 1,
    value: 'F'
}); 
var recordId = ccRefund.save(); 

        

Related Topics

General Notices