Skip to content

Not all fields are included in add command when ActiveRecord is already persisted #17

@iloveitaly

Description

@iloveitaly
  1. rails model is saved, but ns push does not occur because of a if: sync conditional
  2. ns push occurs at a later date, because of another save operation
  3. only modified fields are included in the add call. add call fails.

TODO

  • modify PushManager opts[:modified] field logic to be dependent on new_netsuite_record?
    if opts[:modified_fields]
    # if Array, we need to convert info fields hash based on the record definition
    if opts[:modified_fields].is_a?(Array)
    opts[:modified_fields] = all_netsuite_fields(local_record).select { |k,v| opts[:modified_fields].include?(k) }
    end
    else
    opts[:modified_fields] = modified_local_fields(local_record)
    end
  • test case

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions