This topic contains 4 replies, has 0 voices, and was last updated by sbkp 8 years ago.

  • Author
    Posts
  • #6620

    sbkp

    I have an integration that adds sales orders to NetSuite via SuiteTalk. All is well, but we’d like to capture the credit card on the customer record so it can be used for future transactions within NetSuite. This works as expected when an order is entered in the UI. I haven’t, however, found the field to set in the sales order record to cause it to happen via the integration. Suggestions?

    Thanks!
    This is a cached copy. Click here to see the original post.

  • #6621

    david.smith

    I don’t use SuiteTalk but I did just write a RESTLet that saves the CC info to a customer’s record. Once the CC is on the customer you can use it for transactions.

  • #6622

    chanarbon

    HI @sbkp,

    For this one, I would suggest the use of script to have the CC field copied from the sales order to the customer record. Since you are using SuiteTalk, you can have a user event script deployed on your sales order on before submit and copy the cc info to to customer record by performing a load record of the customer in the sales order and add the cc info then perform an nlapiSubmitRecord() for the customer record.

  • #6623

    tect22

    Hi sbkp,

    Assuming you have existing customer records that have a credit card list, when entering to sales order, you need to initialize customer with the credit card record.

    Below is an example in .NET Code:

    Dim ns as New NetSuiteService

    Dim so_record as New SalesOrder, cust_record as Customer

    Dim cust_recordref as RecordRef

    Dim cust_data as ReadResponse

    ‘initialize the customer credit card list

    Dim cust_creditcard as CustomerCreditcardsList

    Dim creditcard_id as String = 3

    Dim customer_id as String = 20

    ‘sample internalId of Customer, Customer Credit Card can be pass as parameter or from a RecordRef from a newly credit customer record and a customer credit card record

    cust_recordref.internalId = customer_id

    cust_recordref.type = RecordType.customer

    cust_recordref.typeSpecified = True

    cust_data = ns.get(cust_recordref)

    cust_record = cust_data.record

    cust_creditcard = custrecord.creditCardsList

    for i as integer = 0 to cust_creditcard.creditCards.Length – 1

    if(cust_creditcard.creditCards(0).internalId = creditcard_id) Then

    so_record.creditCard.internalId = cust_creditCards(0).internalId

    End if

    next i

    Hope this may help you!!!!!

  • #6624

    sbkp

    Thanks, all. I’ll try these out. (Sorry for the delay responding… I went on a long vacation soon after posting.)

You must be logged in to reply to this topic.