This topic contains 9 replies, has 0 voices, and was last updated by Brettsuite 8 years, 9 months ago.

  • Author
    Posts
  • #10296

    mneedhameleven

    I am trying to create a custom action that would ask for user input input in a popup before moving on and then store that value in a text field on the record. Seemed like an easy thing. I use the a prompt function and then I have a varialbe I can pass. Works like a champ in Suiteflow but I am trying to create this as a custom action I can use in multiple places. I keep getting the error Reference Error: “prompt” is not defined. Below is the portion of script I use. Any help would be appreciated. Oh and I think prompt would make a great standard action will probally look for or file an enhancement request for this.

    var reject = prompt(‘Please enter your reason for rejection’,”);
    This is a cached copy. Click here to see the original post.

  • #10297

    mneedhameleven

    I have a feeling I am getting this because of the timing of the custom action (even though I fire on before record submit it still loads the action on the server side) can anyone confirm that?

  • #10298

    dmatyas

    Workflow action script is always executed on the server side as you correctly mentioned above. To achieve what you want a client side SuiteScript has to be used.

    Daniel

  • #10299

    mneedhameleven

    Yeah thanks I figured that one out. Bummer.

  • #10300

    JosephJT

    can you share how you achieved it via client script, I am new to this and trying to do the same as you mentioned, capture the rejection reason.

  • #10301

    mneedhameleven

    I simply used the javascript prompt a=prompt(“Put your Answer Here”)

  • #10302

    support@thevested.com

    Are your buttons added to the form by the workflow and if so, how did you attach the client script to the reject button?

  • #10303

    kelly.morgan@teamtag.net

    Can anyone share further instruction about adding user input about rejection reason in a Workflow?

  • #10304

    Sree

    Hi all,

    I tried the similar thing, have workflow custom action on entry do a windows prompt. This will be triggered on the click of Reject button and will continue with other steps in the workflow.

    var RejectReason = prompt(“Please enter your Rejection Reason”, “Rejected because – “); Getting the error:

    ReferenceError: “prompt” is not defined.

    This is on entry to the workflow state. Any ideas?

    Thanks in advance

    Sree

  • #10305

    Brettsuite

    I was told by a NS support rep to create a suitelet; then using a workflow to add a button to the transaction that would trigger the suitelet even when the record is in View mode. I have created a suitelet that partially works. Since I am a newbie to SuiteScript the problems I am now faced with are as follows:

    1. I don’t know how to instruct the suitelet to return to the transaction record and store the response into my custom field called Rejection reason.

    2. I have created a second suitelet that will put the first Suitelet into a pop up window instead of going to a web page. I found that is the way Netsuite is doing it for the Delete transaction reason feature. When I searched the code (which took a lot of digging) I found nlExtOpenWindow ( url, ‘ ‘, width, height, false, title); I created my variables for url, width, height and title but I get this error “ReferenceError: “nlExtOpenWindow” is not defined.” I have searched and searched and I can not find any documentation on nlExtOpenWindow.

    The theory of this sounds easy but Netsuite is making this pretty difficult and frustrating. I see that it can be done with the Reason for Deleting a Transaction feature introduced in Version 15.2.

You must be logged in to reply to this topic.