Marty Zigman - The NetSuite Expert

Conversations with Marty Zigman

Certified Administrator • ERP • SuiteCloud

Prolecto Labs Accelerator Templates

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

Holding all three official certifications, Marty is regarded as the top NetSuite expert and leads a team of senior professionals at Prolecto Resources, Inc. He is a former Deloitte & Touche CPA and has held CTO roles. For over 30 years, Marty has produced leadership in ERP, CRM and eCommerce business systems. Contact Marty to set up a conversation.

More Posts - Website - Twitter - Facebook - LinkedIn - YouTube

About Marty Zigman

Marty Zigman

Holding all three official certifications, Marty is regarded as the top NetSuite expert and leads a team of senior professionals at Prolecto Resources, Inc. He is a former Deloitte & Touche CPA and has held CTO roles. For over 30 years, Marty has produced leadership in ERP, CRM and eCommerce business systems. Contact Marty to set up a conversation.

Biography • Website • X (Twitter) • Facebook • LinkedIn • YouTube

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

  1. Hemnag says:

    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.

  2. David Lyle says:

    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!

  3. David Lyle says:

    I think I got my question answered regarding grabbing the full URL for external suitelet URLs, seems like this isn’t possible to do server-side and must be accomplished client-side. Thought I’d follow up with this post so you don’t have to waste time on me lol.

    https://community.oracle.com/message/15291087#15291087

    Thanks again Mr. Zigman for all your articles online.

  4. 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!

  5. Yukti Brinkman says:

    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!!

  6. Marty Zigman says:

    Hi Yukti,

    This is good to learn other ways to drive the URLs. Thank you. I don’t know of a different way based on the URL. However, I have programmed the CRM message handler and it is conceivable to catch a different parameter and then, on that message’s BeforeLoad, do you what you need to. Not quick, but possible.

    Marty

  7. Paul says:

    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 🙂

  8. Marty Zigman says:

    Thank you. I am grateful for Google as I don’t try to game it.

    Marty

  9. Amar P says:

    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!

  10. Marty Zigman says:

    Hi Amar,

    There may be a way but I don’t think we know it. I asked the team. But we did do something that helped a client who was troubled by the way that the Expense Tab was always coming up first in the Vendor Bill implementation. We basically hid it in a beforeload user event.

    var sublist = form.getSubList(‘expense’);
    if (sublist){
    sublist.setDisplayType(‘hidden’);

    Marty

  11. Nina L says:

    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)?

  12. Marty Zigman says:

    Hello Nina,

    We don’t see a native way. It may be there but it is not be documented. We do all kinds of tricks like this with our Prolecto Utilities library that we provide to our clients without license charge.

    Marty

  13. Ivan A says:

    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.

  14. Marty Zigman says:

    Hello Ivan,

    Not that we know of. However, with some client-side scripts, we could listen to the URL parameters to drive your desired behavior.

    Marty

Leave a Reply

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