README.md in netsuite-0.2.4 vs README.md in netsuite-0.2.5
- old
+ new
@@ -31,10 +31,13 @@
bundle exec rspec
```
## Usage
### Configuration
+
+Not sure how to find your account id? Search for "web service preferences" in the NetSuite global search.
+
```ruby
NetSuite.configure do
reset!
# optional, defaults to 2011_2
@@ -272,6 +275,35 @@
# other fields will then fall back to their default values
contact = NetSuite::Records::Contact.get(12345)
contact.custom_field_list.custentity_alistfield = { internal_id: 1 }
contact.custom_field_list.custentity_abooleanfield = true
contact.update(custom_field_list: contact.custom_field_list)
+
+# the getList operation
+NetSuite::Records::CustomRecord.get_list(
+ # netsuite internalIDs
+ list: [1,2,3],
+ # only needed for a custom record
+ type_id: 1234
+).each do |record|
+ # do your thing...
+end
+
+# getting a custom record
+record = NetSuite::Records::CustomRecord.get(
+ # custom record type
+ type_id: 10,
+ # reference to instance of the custom record type
+ internal_id: 100
+)
+
+# adding a custom record
+record = NetSuite::Records::CustomRecord.new
+record.rec_type = NetSuite::Records::CustomRecord.new(internal_id: 10)
+record.custom_field_list.custrecord_locationstate = "New Jersey"
+record.add
+
+# updating a custom record
+record = NetSuite::Records::CustomRecord.new(internal_id: 100)
+record.custom_field_list.custrecord_locationstate = "New Jersey"
+record.update(custom_field_list: record.custom_field_list, rec_type: NetSuite::Records::CustomRecord.new(internal_id: 10))
```