Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update customer record (update fields, add search only fields) #535

Merged
merged 3 commits into from
May 7, 2022

Conversation

cgunther
Copy link
Contributor

@cgunther cgunther commented May 6, 2022

I needed the onCreditHold field, which is only available via searches, so figured I'd add all the search only fields.

Before adding all the search only fields, figured it was wise to update all the regular fields since search only fields often seem to be a superset of the regular fields. A few fields were corrected to be record_refs and a few were removed as they require special sublist classes that aren't yet implemented.

There is a breaking change here renaming CustomerSubscriptionsList to SubscriptionsList and CustomerSubscription to Subscription. Looking at the schema for Customer, you'll see the type for subscriptionsList is SubscriptionsList (no Customer prefix). This is true as far back as 2014.1 too. This break isn't strictly required, it could be removed from this PR, but seemed best to be consistent with NetSuite's record naming.

…scription to Subscription

At least as far back as 2014.1, NetSuite used these names, without the
Customer prefix, so this aligns the gems naming with NetSuite.

This would be a breaking change for anyone using the old name.
The following were moved from `fields` to `record_refs`:
- buying_reason
- buying_time_frame
- campaign_category
- image
- opening_balance_account
- pref_cc_processor
- representing_subsidiary
- sales_group
- sales_readiness

The following were removed as `fields` since their sublist class is not
yet implemented:
- download_list
- group_pricing_list
- item_pricing_list

I didn't update read-only fields as I don't trust NetSuite's
documentation. They say `creditHoldOverride` is read-only, for example,
but I can very clearly edit it. Therefore opting to leave this list
as-is to avoid breaking changes.
@cgunther cgunther force-pushed the customer-search-only-fields branch from 15b0d98 to def2636 Compare May 6, 2022 15:52
@iloveitaly
Copy link
Member

I think 2014.1 isn't supported, so I'm fine merging this in. Thanks again for all of the great PRs1

@iloveitaly iloveitaly merged commit 9014cec into NetSweet:master May 7, 2022
@cgunther cgunther deleted the customer-search-only-fields branch May 9, 2022 13:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants