Radiobutton that sends a specific email response:

Avatar

Avatar

johnnyp32387969

Avatar

johnnyp32387969

johnnyp32387969

07-03-2018

I have a form that includes a radiobutton selection of reject or approve.  Pending on what the sales director chooses, i would like the button that selected to submit a specific email response.  I'm not too familiar with JavaScript and if and else statements, so i'm sure its something obvious that i'm not seeing.  Can someone let me know where i need to adjust?

Thanks,

Here is the code:

form1.page1.subform4.Button1::click - (JavaScript, client)

//If Sales Director approves the request then send this approval E-mail.

If (subform4.RadioButtonList == "1")  {

event.target.mailDoc({

    bUI: false,

    // Mail to...

    cTo: "TestPerson",

    //Copy address

    cCc: "TestPerson" + "TestPerson" + subform1.applicationEngineer.rawValue,

    //Subject line

    cSubject: "HI Order Expedite Request - Accepted for " + subform1.projectName.rawValue,

    //Body of e-mail

    cMsg: "We have received a request to expedite " + subform1.projectNumber.rawValue + " - " + subform1.projectName.rawValue + "." +

    "\n" + "Please complete the purchase review section of the attached form and" +

    "\n" +

    "\n" + "Thanks you"

   });

   }

//If the Sales director rejects the request, then send this rejection letter.

    else {

    event.target.mailDoc({

     bUI: false,

    // Mail to...

    cTo: subform1.applicationEngineer.rawValue,

    //Copy address

    cCc: "TestPerson",

    //Subject line

    cSubject: "HI Order Expedite Request - Rejected for " + subform1.projectName.rawValue,

    //Body of e-mail

    cMsg: "Please review the attachment and either accept it or reject the expeditied request.  For more information, please reach out to " + subform1.applicationEngineer.rawValue +

    "\n" +

    "\n" +

    "\n" + "Thanks you"

   

});

}

Accepted Solutions (0)

Answers (3)

Answers (3)

Avatar

Avatar

mouslander

Avatar

mouslander

mouslander

13-03-2018

Awesome. Its nice when you can figure it out.

Avatar

Avatar

johnnyp32387969

Avatar

johnnyp32387969

johnnyp32387969

13-03-2018

Mouslander - I was able to workshop it and get it the way i wanted.  I appreciate the prompt response.

Avatar

Avatar

mouslander

Avatar

mouslander

mouslander

08-03-2018

I've created a sample. I am happy to send it to you if you provide your email address.