NetSweet/netsuite

Fields that can _never_ be updated, should be excluded when performing an upsert

Closed this issue · 1 comments

Problem

Fields like cost_estimate cannot be updated on sales order items in NetSuite, and to my knowledge there is no way to allow them to be updated unless you use suitescript or the like. If we perform an upsert, we should probably avoid trying to update those values.

Expected Solution

NetSuite::Records::SalesOrder.get(1234).upsert should work in all cases.

I might be missing really obvious reasons why this can't be the case. Please don't hesitate to let me know if I am.

@Senjai The easiest way to handle this is to add this soap_header:

875c03b

Alternatively a list of read_only fields can be added to each record. This is more time consuming from a dev perspective, but feel free to submit a PR for any records that are causing you issues:

read_only_fields :sub_total, :discount_total, :total, :recognized_revenue, :amount_remaining, :amount_paid,