title: SuiteScript 2.0 : Retrieve the values of the parameters passed from the sales order into the suitelet using the getParameter
body: <p>
  I am new to Suitelet. My object is to redirect from Sales Order to Form Suitelet. 
  I create a file.js to redirect from a userevent script to a suitelet.</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-html lang-html prettyprint-override"><code>function afterSubmit(scriptContext) {
  
    if (scriptContext.type != 'delete') {
  
     var salesOrder = scriptContext.newRecord;
  
     var orderId = salesOrder.getValue('tranid');
     var customer = salesOrder.getValue('entity');
     var date = salesOrder.getValue('trandate');
     var total = salesOrder.getValue('total');
     var financePrice = salesOrder
       .getValue('custbody_rmb_financing_price');
     var internalid = salesOrder.id;
  
     var arrParams = {
      custparam_orderid : orderId,
      custparam_customer : customer,
      custparam_date : date,
      custparam_total : total,
      custparam_financeprice : financePrice,
      custparam_id : internalid
     };
     salesOrder.save({
      ignoreMandatoryFields : true
     });
  
     redirect.toSuitelet({
      scriptId : 'customscript_rmb_salesorderfinance_suite',
      deploymentId : 'customdeploy_rmb_salesorderfinance_suite',
      params : arrParams
     });
  
    }
  
   }</code></pre>
  </div>
  </div>
  
  I create another file to redirect and display data of sales order.</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-html lang-html prettyprint-override"><code>function(serverWidget, http, runtime, record) {
  
     /**
      * Definition of the Suitelet script trigger point.
      * 
      * @param {Object}
      *            context
      * @param {ServerRequest}
      *            context.request - Encapsulation of the incoming
      *            request
      * @param {ServerResponse}
      *            context.response - Encapsulation of the Suitelet
      *            response
      * @Since 2015.2
      */
     function processSalesOrderFinancing(context) {
  
      if (context.request.method == 'GET') {
  
       var form = serverWidget.createForm('Sales Order Financing');
  
       form
         .addField({
          id : 'custpage__sdr_financing_help',
          type : 'help',
          label : 'Please assign a price to the financing of this sales order, then click Submit Financing'
         });
       var scriptObj = runtime.getCurrentScript();
  
        var stOrder =
        scriptObj.getParameter("custparam_orderid");
       var stCustomer =  scriptObj.getParameter("custparam_customer");
  
       var stDate = scriptObj.getParameter("custparam_date");
       var stTotal = scriptObj.getParameter("custparam_total");
  
       var orderid = form.addField({
        id : 'custpage_rmb_order',
        type : 'text',
        label : 'order#'
       });
  
       form.updateDefaultValues({
        custpage_rmb_order : stOrder
       });
  
       orderid.updateDisplayType({
        displayType : serverWidget.FieldDisplayType.INLINE
       });
       var customer = form.addField({
        id : 'custpage_rmb_customer',
        type : 'text',
        label : 'Customer:Project'
       });
  
       form.updateDefaultValues({
        custpage_rmb_customer : stCustomer
       });
  
       customer.updateDisplayType({
        displayType : serverWidget.FieldDisplayType.INLINE
       });
       var date = form.addField({
        id : 'custpage_rmb_date',
        type : 'date',
        label : 'Date'
       });
  
       date.updateDisplayType({
        displayType : serverWidget.FieldDisplayType.INLINE
       });
  
       form.updateDefaultValues({
        custpage_rmb_date : stDate
       });
  
       var total = form.addField({
        id : 'custpage_rmb_total',
        type : 'currency',
        label : 'Total'
       });
  
       form.updateDefaultValues({
        custpage_rmb_total : stTotal
       });
  
       total.updateDisplayType({
        displayType : serverWidget.FieldDisplayType.INLINE
       });
  
       var financeprice = form.addField({
        id : 'custpage_rmb_fprice',
        type : 'currency',
        label : 'Finance Price'
       });
  
       var salesID = form.addField({
        id : 'custpage_rmb_orderid',
        type : 'text',
        label : 'LABEL'
       });
  
       salesID.updateDisplayType({
        displayType : serverWidget.FieldDisplayType.HIDDEN
       });
  
       form.addSubmitButton('Submit Financing RMB');
  
       context.response.writePage({
        pageObject : form
       });
      } }</code></pre>
  </div>
  </div>
  </p>
  
  <p>After that code, I don't get the data of sales order on the 
  the form. I don't get the result that I want. <code>getParameter</code> returns null.</p>
  
  <p><img src="https://i.stack.imgur.com/r3O42.png" alt="enter image description here"></p>
  
  <p>If you have any ideas to help me, I will be thankful.</p>