Expand my Community achievements bar.

SOLVED

How to send PDF form to cc dependent email field(master field - Location) with Submit button

Avatar

Level 1

Good Afternoon!

 

I am working in LiveCycle Designer ES4. My all fields are working however my DropDownList2 is selecting email however not adding email to cc when I hit submit.

 

I made a form with Submit button (added HR Email), Location, and managers name drop down button, managers email dropdown button.

I need the form to be submitted to the manager of the location based on Location selection. And I am looking for auto selection(want to hide these 2 fields) of managers name drop down button, managers email dropdown button based on location selection.

managers name drop down button, managers email dropdown button.

 

I added one Submit Button to Send Email to HR every time. Additionally, I need to keep location manager in cc based on location selection, the manager name is populating depending upon location selection. 

 

I added actions to my Location field and Manager Name - Manager' Email Address are dependent selection based on Location Field. For example 

Location

1

2

3

4

6

I added actions with every Location selected with DropDownList1( Managers Name) and  DropDownList2 Managers Email List.

Location - Manager Name - Manager' Email Address

 1 - 1 - A

 2 - 2-B

 3 - 3- C

4, 5, 6 - 4 -D

 

MeenuSTS_0-1715701605726.png

 

MeenuSTS_1-1715701605630.png

 

MeenuSTS_2-1715701605795.png

 

 


 
Updating Media

 

 

1 Accepted Solution

Avatar

Correct answer by
Community Advisor

Hello, Can you please share your form at vkatoch07@gmail.com

 

You can write the below code to send an email with the click of a button.

You can check your cc address, and why its not coming by putting an alert in the script.

 

var myDoc = event.target;
try {
myDoc.mailDoc({
          bUI: false,
          cTo: "to email come here",
         cCC: "CC Email Addresses",
        cSubject: subject,
          cSubmitAs: "PDF",
          cCharset:"utf-8"
            });
        } catch (e) {}

View solution in original post

1 Reply

Avatar

Correct answer by
Community Advisor

Hello, Can you please share your form at vkatoch07@gmail.com

 

You can write the below code to send an email with the click of a button.

You can check your cc address, and why its not coming by putting an alert in the script.

 

var myDoc = event.target;
try {
myDoc.mailDoc({
          bUI: false,
          cTo: "to email come here",
         cCC: "CC Email Addresses",
        cSubject: subject,
          cSubmitAs: "PDF",
          cCharset:"utf-8"
            });
        } catch (e) {}
The following has evaluated to null or missing: ==> liql("SELECT id, subject, body, depth, post_time, author.login, author.id, author.rank, metrics.views FROM messages WHERE topic.id = '${topicId}' AND is_solution = true").data.items[0] [in template "analytics-container" at line 82, column 31] ---- Tip: It's the final [] step that caused this error, not those before it. ---- Tip: If the failing expression is known to be legally refer to something that's sometimes null or missing, either specify a default value like myOptionalVar!myDefault, or use <#if myOptionalVar??>when-present<#else>when-missing. (These only cover the last step of the expression; to cover the whole expression, use parenthesis: (myOptionalVar.foo)!myDefault, (myOptionalVar.foo)?? ---- ---- FTL stack trace ("~" means nesting-related): - Failed at: #assign acceptedAnswer = liql("SELECT... [in template "analytics-container" at line 82, column 5] ----