Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
BedrockMission!

Learn more

View all

Sign in to view all badges

Radiobutton that sends a specific email response:

johnnyp32387969
Level 2
Level 2

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"

   

});

}

3 Replies
mouslander
Level 7
Level 7

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

johnnyp32387969
Level 2
Level 2

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

mouslander
Level 7
Level 7

Awesome. Its nice when you can figure it out.