This topic contains 2 replies, has 0 voices, and was last updated by chuckles 9 years, 6 months ago.

  • Author
    Posts
  • #6973

    chuckles

    Senior moment, guys and gals. I have a custom body check box on an invoice that I want to check true. My program says it happens, but it doesn’t appear to. Here is the snippet… PInvoice = (Invoice)records[0];

    int y = 0;

    CustomFieldRef[] customBodyRefs = null;

    customBodyRefs = newCustomFieldRef[1];

    Invoice newInvoice = newInvoice();

    newInvoice.internalId = PInvoice.internalId;

    // Place “true” in Electronic

    // Add custom fields to invoice record

    BooleanCustomFieldRef electronic = newBooleanCustomFieldRef();

    electronic.internalId = “custbody9”;

    electronic.value = true;

    customBodyRefs[0] = electronic;

    newInvoice.customFieldList = customBodyRefs;

    WriteResponse insertStatus = newWriteResponse();

    insertStatus = _service.update(newInvoice);

    if (insertStatus.status.isSuccess == true)

    ….

    Any takers?
    This is a cached copy. Click here to see the original post.

  • #6974

    Daniel Giguere

    Hi, since 2013_2, internalId has been replaced by scriptId for custom fields. You may try with electronic.scriptId = “custbody9”;

    Hope this helps.

  • #6975

    chuckles

    Many thanks, my friend. Guess I need to go back and “teach this old dog some new tricks”.

You must be logged in to reply to this topic.