Vendor Payment Record Actions

The vendor payment record currently supports the confirm and decline actions.

For help working with this record in the UI, see Vendor Payments.

For information about SuiteScript 2.0 record actions, see the following help topics:

confirm

Corresponding UI Button

Confirm

Action Description

Changes a payment’s status from Payment In-Transit to Payment Confirmed.

Returns

{notifications:[], response:{}}

Supported Script Types

Client and server scripts

For additional information, see SuiteScript 2.x Script Types.

Governance

10 usage units

Since

2018.2

Parameters

See action.execute(options) for details about parameters required for the execution of any action. The confirm action supports the following parameters.

Parameter

Type

Required / Optional

Description

Since

exchangerate

string

optional

The exchange rate at the time of the transaction’s confirmation.

2018.2

confirmationdate

string

optional

The date on which the transaction is confirmed and posted.

2018.2

postingperiod

string

optional

The transaction posting period.

2018.2

clearpayment

string

optional

Indicates if the payment should be marked as cleared.

2018.2

recordId

int

required

The record ID.

2018.2

Vendor Payment Confirm Action Syntax

              require(['N/action'], function(action){
    // action & action list loading
    var actionList = action.find({
        recordType: 'vendorpayment'
    });    
    var actionObj = action.get({
        recordType: 'vendorpayment',
        id: 'confirm'
    });

    // action execution 1  
    var result1 = action.execute({
        recordType: 'vendorpayment',
        id: 'confirm',
        params: {
            recordId: 101,
            exchangerate: '1.0',
            trandate: '5/10/2018',
            postingperiod: '243',
            clearpayment: 'T'
        }
    }); 

    // action execution 2
    var result2 = actionObj.execute({
        recordId: 102,
        exchangerate : '1.0',
        trandate: '5/10/2018',
        postingperiod: '243',
        clearpayment: 'F'
    }); 
    // action execution 3
    var result3 = actionObj({
        recordId: 103,
        exchangerate : '1.0',
        trandate: '5/10/2018',
        postingperiod: '243',
        clearpayment: 'F'
    });
}); 

            

decline

Corresponding UI Button

Decline

Action Description

Declines a payment’s status from Payment In-Transit to Payment Declined.

Returns

{notifications:[], response:{}}

Supported Script Types

Client and server scripts

For additional information, see SuiteScript 2.x Script Types.

Governance

10 usage units

Since

2018.2

Parameters

See action.execute(options) for details about parameters required for the execution of any action. The decline action does not support parameters aside from recordId.

Vendor Payment Decline Action Syntax

            require(['N/action'], function(action){
    // action & action list loading
    var actionList = action.find({
        recordType: 'vendorpayment'
    }); 
    var actionObj = action.get({
        recordType: 'vendorpayment',
        id: 'decline'
    });

    // action execution 1
    var result = action.execute({
        recordType: 'vendorpayment',
        id: 'decline',
        params: {
            recordId: 101
        }
    });       

    // action execution 2 
    var result = actionObj.execute({
        recordId: 102
    });
      
    // action execution 3
    var result = actionObj({
        recordId: 103
    });
}); 

          

Related Topics

Vendor Payment
Working with the SuiteScript Records Browser
SuiteCloud Supported Records
Transactions

General Notices