Skip to main content
Participating Frequently
August 22, 2018
Answered

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

  • August 22, 2018
  • 2 replies
  • 629 views

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 has been closed for replies.
Correct answer George_Johnson

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.

2 replies

Inspiring
August 22, 2018

Change CTo to cTo.

Participating Frequently
August 22, 2018

corrected that, thanks still doesn't work.

try67
Community Expert
Community Expert
August 22, 2018

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

Participating Frequently
August 22, 2018

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

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.