AF
HomeTagSubmit NotesAsk AnythingLoginSubscribe Us
AF
1. Feel Free to ask and submit anything on Anyforum.in and get satisfactory answer
2. Registration is not compulsory, you can directly login via google or facebook
3. Our Experts are looking for yours ?.



web-service-netsuite: Custom records using netsuite web services

Can we update custom record of netsuite using netsuite webservices?

web-service x 19
netsuite x 18
Posted On : 2015-01-12 14:29:35.0
profile Amol Ghadage - anyforum.in Amol Ghadage
2900
up-rate
5
down-rate

Answers


Custom Records are entry forms based on existing record types but customized to include fields for gathering information specific to the needs of your business. Use the Custom Record to define records to emulate existing custom records.
The Custom record is defined in the setupCustom (Customization) XSD.

Supported Operations:
-------------------------------------------------------
The following operations can be used to manipulate custom records.
add | addList | update | updateList | delete | deleteList | get | getList | search | searchMore | searchNext | getSelectValue


Note:
------------------------
Currently we do NOT support the store values option on custom records.



Working with References:
--------------------------------------------------------------
When referencing custom records, you may need a separate CustomRecordRef type and a RecordRef type.
RecordRef and CustomRecordRef both descend from BaseRef. They are most prominently used in get(), and that is why they have a type attribute. CustomRecordRef has a typeId to indicate which kind of CustomRecord it is. Therefore, you can NOT get a CustomRecord by setting the RecordRef.type to customRecord on add ---- you must use CustomRecordRef to specify the kind of CustomRecord.


CustomRecord descends from Record, just like Customer or Opportunity. This is what you submit to add() and it is what is returned through search(). CustomRecord uses a RecordRef() to store it´s type information.



To add a CustomRecord:
-----------------------------------------------------------
CustomRecord myCR = new CustomRecord();
RecordRef rt = new RecordRef();
rt.setName("Authors");
rt.setId("3"); // This indicates a typeId of 3 and corresponds to the Authors CustomRecord type
myCR.setRecType(rt);
myCR.setName("Ernest Hemmingway"); // This is what will show up in List->CustomRecords->Authors under Name
myCR.setCustomFieldList(myCFL); // An already filled out CustomField List
WriteResponse wr = port.add(myCR);

Note that setTypeId is not submitted since this is the internal ID returned by the response, just like for normal records.


To get a CustomRecord:
----------------------------------------------------
CustomRecordRef myCRR = new CustomRecordRef();
myCRR.setKey("1200"); // The key we got back
myCRR.setTypeId("3"); // For Authors
myCRR.setType(RecordType.customRecord);
ReadResponse rr = port.get(myCRR);


Similarly update operation is also same as we perform in other records.

Posted On : 2015-01-13 23:33:05
Satisfied : 2 Yes  0 No
profile Rishi Kumar - anyforum.in Rishi Kumar
523188245674
Reply This Thread
up-rate
4
down-rate



Post Answer
Please Login First to Post Answer: Login login with facebook - anyforum.in