Marty Zigman

Conversations with Marty Zigman

Certified Administrator • ERP • SuiteCloud

Drive Values to NetSuite Forms and Other URL Tricks

NetSuite Technical



This article is relevant if you need to automatically fill in values to NetSuite records or you need more flexibility for referencing custom scripts in URLs.

Background

In our NetSuite Systems Integration Practice, we see all kinds of situations which demand the use of the NetSuite platform to produce innovation. Along the way, we learn things that are not documented. I learn many things from our team members. Yet it is special when our client NetSuite Administrators share their discoveries.

This article is in gratitude to Sterling Rose, NetSuite Administrator and ERP Manager at one of our clients.  On two occasions, Sterling brought to our team NetSuite features that are indeed useful when working to drive an enhanced day-to-day user experience.  Accordingly, I would like to bring these to you below:

Automatically Fill NetSuite Body / Header Record Values

Sterling discovered that if you append the parameter value pattern “record.fieldName=value” to a URL, you can get NetSuite to prefill information on records. For example, consider the following URL:

https://system.netsuite.com/app/common/entity/contact.nl?record.email=wilda.beesting%40whereduhwildflowersis.com&record.lastname=Beesting&record.firstname=Wilda&record.comments=test%20hey%20how%20ya%20doing&whence=#

Here, we are driving four values:

  1. email = wilda.beesting@whereduhwildflowersis.com
  2. lastname = Beesting
  3. firstname = Wilda
  4. comments = test hey how ya doing

To get this to work, you need to URL encode the field values so they are parsed correctly by NetSuite.  Based on testing, it appears this trick works only for Body or Header values.

Flexible Script Deployment Referencing

When you want to deploy a script, such as a SuiteLet or a Restlet, NetSuite will offer a URL that will produce integer based internal IDs to reference the script definition and deployment. It’s not obvious, but you can instead reference the script and deployment by name. When doing so, you do not need to worry about the URL elements changing as you are working between environments (remember, the server name may change depending on the data center) or across account deployments. Consider the following URLs:

Provided by NetSuite
https://rest.netsuite.com/app/site/hosting/restlet.nl?script=646&deploy=1

Change the script reference
https://rest.netsuite.com/app/site/hosting/restlet.nl?script=customscript_auth_api_endpoint&deploy=1

Change the script deployment reference
https://rest.netsuite.com/app/site/hosting/restlet.nl?script=customscript_auth_api_endpoint&deploy=customdeploy_auth_api_endpoint

Drive a Better NetSuite Experience

We all gain a high degree of productivity in our customization enhancements since NetSuite is an application framework and not a general rudimentary programming/database language. Yet, as with all software constructs, this application framework has imposed constraints as published by NetSuite. Thus, anything we can do to invent and work with the imposed constraints helps us become better actors to deliver value to our community.

I appreciate Sterling and his contribution to our team and to the larger NetSuite community. If you would like to work with a team of passionate and creative NetSuite professionals, let’s have a conversation.

Marty Zigman LinkedIn

Marty Zigman

Holding three official certifications, Marty is widely recognized as a top NetSuite expert and leads a team of senior professionals at Prolecto Resources, Inc. A former Deloitte & Touche CPA and technology executive with CTO roles, he brings over 35 years of leadership in ERP, CRM, and eCommerce business systems. Contact Marty to engage directly.

Biography • YouTube • LinkedIn • X (Twitter)

14 thoughts on “Drive Values to NetSuite Forms and Other URL Tricks”

  1. Hi Marty

    Automatically fill Netsuite body values is indeed new discovery. For script deployment referencing it is similar that in saved search too one can replace the number with script internal id.

    Thanks.

    Reply
  2. Great content as usual. Love that url’s can have record.whatever as a parameter to fill in body fields. Will help tremendously with some pre-validations workflows.

    As for working between environments, I’m able to generate a dynamic URL from within SS2.0 whether I’m in sandbox or production. I’m curious if there’s a way for the code to generate the URL whether it’s being access from within Netsuite or being access as an external URL (that is: when “AVAILABLE WITHOUT LOGIN” is checked on the script’s deployment).

    Thanks again for all the great content Mr. Zigman: I’ve really learned a lot from you!

    Reply
  3. Thanks for providing this information! I knew there had to be a way to do this, I was looking through NS articles and couldn’t find anything referencing doing this. If you ever come across getting it to work on sublist items within the record such as Purchase Order or Sales Order please let me know. Thanks Again!

    Reply
  4. Thank you for this!!
    referring also to SuiteAnswer Id: 27286 I am able to create a link that opens a particular email template and pass in the entity (XXX)and the email template(ZZZ)

    However, I would like to pass in a different email address than the one listed as the entity’s company email address. NetSuite frustratingly defaults to that and it causes many emails to be inadvertently sent to the wrong person.

    Can you provide a hint on what the field name I should use here if it is not recipientemail?

    When I enter the following, the recipient email still gets pulled in from the company record rather than using the one i am trying to pass through

    https://system.netsuite.com/app/crm/common/crmmessage.nl?entitytype=custjob&entity=XXX&recipientemail=YYY%gmail.com&l=T&templatetype=EMAIL&template=ZZZ

    thanks for any advice!!

    Reply
  5. Thanks again Marty – time and time again your articles are top of the list in search results, and you are there to solve our NetSuite problems 🙂

    Reply
  6. Hi Marty,

    Are you familiar with how to pick a specific tab when loading a record via URL? So when you open, say, a Sales Order, it’ll open to the specific tab you specify. For example, the files ‘sub-subtab’ within the Communications subtab…
    I have seen the URL appear like that in my address bar once before, but I cannot find it in my chrome history or anywhere online.

    Are you familiar with these URL parameters, or know where to find a list of all of them?

    Thanks, Amar!

    Reply
  7. This works great with new records! Is there a way to write the url to edit a field on an existing record (ideally and save)?

    Reply
  8. Hi Marty,

    There is a way to send parameters and fill the sublist? I want to open a quote with one item pre-filled.

    Thank you.

    Reply

Leave a Reply

Your email address will not be published. Required fields are marked *