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

  • Author
    Posts
  • #6973 Score: 0

    chuckles
    • Contributions: 0
    • Level 1

    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 Score: 0

    Daniel Giguere
    • Contributions: 0
    • Level 1

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

    Hope this helps.

  • #6975 Score: 0

    chuckles
    • Contributions: 0
    • Level 1

    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.