Monday, July 15, 2019

Suitelet call from HTML code throwing an error "This request is missing a required parameter"

There are instances when a user would like to call a Suitelet coming from an HTML code.

If the Suitelet's URL is called via the HTML form action, the user may most likely get the error "This request is missing a required parameter".

The missing parameters are those related to the authentication, specifically the following fields:
  • script
  • deployment
  • compid
  • h

Note:  All of the values for the said parameters could be found on the external URL of the Suitelet.

Below is the sample script:


<form action="<Suitelet's External URL>">
<input type="hidden" name="script" value="<script's internal ID>"><br>
<input type="hidden" name="deploy" value="<script deployment's internal ID>"><br>
<input type="hidden" name="compid" value="<company ID>"><br>
<input type="hidden" name="h" value="<value of h in the URL>"><br>

<input type="submit" value="Submit">


All of the said fields need to be specified on the HTML code for the user to be able to successfully redirect to the Suitelet.

Please also note that it will only work using the externally available URL.

1 comment:

  1. <input type="hidden" name="compid" value="<company ID>" what do u mean by comapny id here