Skip to main content
Participating Frequently
August 22, 2018
Answered

Dynamic Subject line won't allow submit button to work.

This is my script...I can't figure out what I'm missing.  When I click submit it doesn't do anything.  I'm trying to create a dynamic subject line with text in the body to click submit and the form to email as an attachment.

var CID = getField("CID").valueAsString;

var ORG = getField("ORG").valueAsString;

var ClientName = getField("ClientName").valueAsString;

var Requestor = getField("Requestor").valueAsString;

this.mailDoc({CTo:"email@email.com", cSubject: "Billing Adjustment for: CID "+CID+" - Org "+ORG+" - "+ClientName+" - "+Requestor, cMsg: "Please see the attached adjustment for "+ClientName+"."});

Any help is greatly appreciated.

This topic is closed to new replies. Start a new post to keep the conversation going.
George_JohnsonCorrect answer
Inspiring
August 22, 2018

Make sure that the field name you're using in the code matches the actual field name exactly. That error is saying that a field with that name does not exist.

6 replies

Inspiring
August 22, 2018

Change CTo to cTo.

Translate
Participating Frequently
August 22, 2018

corrected that, thanks still doesn't work.

Translate
try67
Community Expert
Community Expert
August 22, 2018

Press Ctrl+J and check if there are any error messages after you click the button.

Translate
Participating Frequently
August 22, 2018

It's tell me my ClientName field is null, however you can see I have text in the field

Translate
George_JohnsonCorrect answer
Inspiring
August 22, 2018

Make sure that the field name you're using in the code matches the actual field name exactly. That error is saying that a field with that name does not exist.

Translate