Marty Zigman

Conversations with Marty Zigman

Certified Administrator • ERP • SuiteCloud

Marty Zigman LinkedIn

Marty Zigman

Holding all three official certifications, Marty is regarded as the top NetSuite expert and leads a team of senior professionals at Prolecto Resources, Inc.. He is a former Deloitte & Touche CPA and has held CTO roles. For over 30 years, Marty has produced leadership in ERP, CRM, and eCommerce business systems. Contact Marty to set up a conversation.

BiographyYouTubeLinkedInX (Twitter)

7 thoughts on “How To: Link a Standalone NetSuite Vendor Bill to a Purchase Order

  1. Hi, We are trying to create a vendor bill from existing purchase order using suitescript N/record module. Following is the code:
    var vendorBill = recordModule.create({
    type: recordModule.Type.VENDOR_BILL,
    isDynamic: true,
    defaultValues: {
    entity: supplierId
    }
    });
    vendorBill.selectNewLine(‘item’);
    vendorBill.setCurrentSublistValue(‘item’, ‘orderdoc’, poId);
    vendorBill.setCurrentSublistValue(‘item’, ‘orderline’, poLineId);

    vendorBill.commitLine(‘item’);
    vendorBill.save({
    enableSourcing: false,
    ignoreMandatoryFields: true
    });
    This above code is written in a restlet and when we invoke it from postman, we get :
    {
    “type”: “error.SuiteScriptError”,
    “name”: “YOU_CANNOT_ADD_MULTIPLE_VENDORS_ANDOR_CURRENCIES_TO_A_SINGLE_VENDOR_BILL”,
    “message”: “You cannot add multiple vendors and/or currencies to a single Vendor Bill.”,
    “id”: “”,
    “stack”: [
    “anonymous(N/serverRecordService)”,
    “postBill(/SuiteScripts/new_post_transaction.js:1402)”,
    “doPost(/SuiteScripts/new_post_transaction.js:641)”
    ],
    “cause”: {
    “type”: “internal error”,
    “code”: “YOU_CANNOT_ADD_MULTIPLE_VENDORS_ANDOR_CURRENCIES_TO_A_SINGLE_VENDOR_BILL”,
    “details”: “You cannot add multiple vendors and/or currencies to a single Vendor Bill.”,
    “userEvent”: null,
    “stackTrace”: [
    “anonymous(N/serverRecordService)”,
    “postBill(/SuiteScripts/new_post_transaction.js:1402)”,
    “doPost(/SuiteScripts/new_post_transaction.js:641)”
    ],
    “notifyOff”: false
    },
    “notifyOff”: false,
    “userFacing”: false
    }
    Please help.

  2. I just did this exact thing except I consolidated a vendor bill from a list of PO items on the inbound shipment (custom NS bundle) record. This needed a UE, CS, and Suitelet script to work; quite the adventure.

    Typically, inbound shipments create one bill per PO whereas my solution allows for a consolidated bill for each vendor in the shipment.

  3. There are three scripts in the solution:

    1. UE script to add a button to the Shipment record linking to a function in a CS. The button is what the user presses when they want to create a consolidated bill rather than one per PO

    2. CS script to redirect the user to a Suitelet

    3. The Suitelet provides the UI/fields etc and business logic to create the consolidated vendor bill based on data from the inbound shipment record and any information added by the user in the Suitelet fields.

    I wanted to hook into the save button on the inbound shipment bill page but that’s not a scriptable record which is why I had to add a new button and Suitelet/UI.

  4. Interestingly, I am finding it a struggle to link the Vendor Bill with an Inbound Shipment. It appears there is one field on the bill (“inboundshipmentvalue”) that shows the internal ID of the shipment but setting that field gives the error: “message”: “Items you have requested in the record have been deleted since you retrieved the form”

    I’ll share the knowledge here once I’ve figured it out incase it’s useful to others.

  5. I have since re-visited the inboundshipmentvalue field (on the vendor bill) and have come to the conclusion that you cannot set this field. If anyone figures out how to link a Vendor Bill to an Inbound Shipment, such that the IBS shows the billed quantity, I’d love to hear about it.

Leave a Reply

Your email address will not be published. Required fields are marked *