Forms in SOAP Web Services

If you are building a generic SOAP web services application, to ensure that your applications are account independent, you should create custom “Web-services-only” forms. Use custom forms for SOAP web services requests by specifying the form in the customForm element of a record. This will alleviate problems associated with customer-specific customizations to forms used in the UI that may break your SOAP web services application code.

Note:

If you are unfamiliar with NetSuite custom forms, see Custom Forms. For information on creating custom forms that you can designate as “web-services-specific,” see Creating Custom Entry and Transaction Forms.

For all record types that support custom forms, if a form is specified in the SOAP web services request, that form will be used for validation. Note that it is generally best practice to specify the custom form in all SOAP web services update operations. Also be aware that no record type is needed when specifying a custom form. You only need to specify the internal ID of the custom form.

To get the internal ID of a custom form, in the UI, go to Customization > Forms > [ form type ], where form type is either an entry or transaction form. The internal ID appears in the Internal ID column if the Show Internal IDs preference is enabled. (For steps on enabling this preference, see Setting the Show Internal IDs Preference.)

To specify a form in SOAP web services, see the following C# snippet, which shows how to associate a particular form with a Customer record.

          // create a customer object

Customer customer = new Customer();

customer.internalId = "555"

// create a custom form object

RecordRef customFormRef = new RecordRef();

// set the internal ID of the custom form. Get the internal ID from
the UI

customFormRef.internalId = "-100";

// set the customForm field on the Customer record to reference the
form

customer.customForm = customFormRef; 

        

If a form is NOT specified, then the default preferred form for that record is used. If a custom form is saved with a record in the UI, that form is not used in the SOAP web services request unless it is also the default form for that record type or is explicitly set as the form in the SOAP web services request.

Related Topics

General Notices