Saturday, January 19, 2019

Getting the External Id using web services.

Getting the External Id using web services

The External ID of a record is a standard NetSuite field but is not viewable from the record itself.  they are used for import purposes only and are only shown from lists and saved searches. Unlike the Internal ID, the External ID cannot be retrieved through web service. One may create a custom field and source the value of the external id to it then run the web services.

Below are the steps on how to create the custom field (for Return Authorization):

1. Customize the Return Authorization custom form.

2. Add a new field.

3. Name your Field to "External ID"

4. Set Type as Free-Form Text and Store Value as False

5. On Applies To tab select Sale

6. Under Display tab > Subtab field select Main so that the custom field will be shown on the main header of the employee record.

7. Under Validation and Defaulting tab check Formula checkbox

8. On the Default Value field enter "{externalid}" which is the tag for External ID

9. Save

10. Run a Transaction Search via Web Services (use the Return Authorization's Internal ID):

 

<platformMsgs:search

         <platformMsgs:searchRecord xsi:type="s0:TransactionSearch">

            <s0:basic>

               <platformCommon:internalId operator="anyOf">

                  <platformCore:searchValue internalId="4254086" />

               </platformCommon:internalId>

               <platformCommon:type operator="anyOf">

                  <platformCore:searchValue>_returnAuthorization</platformCore:searchValue>

               </platformCommon:type>

            </s0:basic>

         </platformMsgs:searchRecord>

</platformMsgs:search>

 

Result:

"External ID field" will appear on the Soap Response

No comments:

Post a Comment