• Marty Lavender
  • NEWBIE
  • 40 Points
  • Member since 2014

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 4
    Questions
  • 11
    Replies
I have a VF Email template that is using a custom formula field to grab the thread ID for a case.

An example of my thread ID is: ref:_00D708Lra._50070koi90:ref

The formula that I am using to generate the thread ID is:

"ref:_00D"&MID(Id,4,1)&"0"&RIGHT($Organization.Id, 4) &"._"& LEFT(Id,4)&"0"&RIGHT(Id,5) &":ref"



I tested by sending a blank email with the thread ID in the subject and the body of the message. No case is opened by SalesForce, which is good as there shouldnt be a new case opened, but the email is never added to the case as a comment. The email just sort of dissapears into nowhere.

Can someone please help me with this?


I am creating a visualforce email template that needs to include the case thread id in it so end users are able to reply. 

I am reading that I should be using {!Case.Thread_Id} but when I use this, I get the following error: Unknown property 'core.email.template.EmailTemplateComponentController.Case' 

If I change this to {!relatedTo.Thread_Id} then I get Invalid field Thread_Id for SObject Case


Can someone please help me on this?    I would assume if I was using default templates that SalesForce could actually just input the ThreadID for me as it is an option on the Case > Settings options page but since were using custom VF templates, this wont work.
I found several articles on building a custom login controller and custom login page for SalesForce Communities. My issue now is that I am missing the 75% code coverage mark by 2 - 3% so I am unable to deploy my new controllers to Production.

I have a CustomLogin controller with the following code:

global with sharing class CustomLoginController {
    global String username {get; set;}
    global String password {get; set;}
    global CustomLoginController () {}
    global PageReference login() {
        return Site.login(username, password, null);
    }
}

I am needing to write a unit test that will test against this code and should get me above or at least to the 75% code coverage requirement. Can someone please help me out here?

I am extremely green when it comes to programming and I have been thrust into this role at my new job.

Thanks
I created the below code for an email template. I get misc errors regarding closing tags for certain opening tags. The closing tags are present. I am not sure why this is happening.

<body style="margin: 0; padding: 0;">
	<table border="0" cellpadding="0" cellspacing="0" width="100%">	
		<tr>
			<td style="padding: 10px 0 30px 0;">
				<table align="center" border="0" cellpadding="0" cellspacing="0" width="600" style="border: 1px solid #cccccc; border-collapse: collapse;">
					<tr>
						<td align="center" bgcolor="#fff" style="padding: 40px 0 30px 0; color: #153643; font-size: 28px; font-weight: bold; font-family: Arial, sans-serif;">
							<img src="21CT_Color_75x75.png" alt="21CT Support" width="75" height="75" style="display: block;" />
						</td>
					</tr>
					<tr>
						<td bgcolor="#ffffff" style="padding: 40px 30px 40px 30px;">
							<table border="0" cellpadding="0" cellspacing="0" width="100%">
								<tr>
									<td style="color: #153643; font-family: Arial, sans-serif; font-size: 24px;">
										<b>A new case has been opened for you</b>
									</td>
								</tr>
								<tr>
									<td style="padding: 20px 0 30px 0; color: #153643; font-family: Arial, sans-serif; font-size: 16px; line-height: 20px;">
										
										Dear {!Case.Contact,Sir or Madam}, </p>

  										Thank you for contacting 21CT Support. </p>

  										A new case has been created and assigned to a member of the 21CT Support team. Your case number is {!Case.Id}. </p>

 										If this case was opened via email, a member of the 21CT Support team will be contacting you shortly. If you have already spoken with a member of our support team, please feel free to respond to this email with any additional information or questions you may have regarding your support issue. </p>

  										<br/>
    									<br/>
    									<br/>
  										<br/>
    									<br/>
    									<br/>

  										<small >**When responding, please do not edit any existing text already placed in the email as this helps us track of your case.</small>

									</td>
								</tr>
								<tr>
								</tr>
							</table>
						</td>
					</tr>
					<tr>
						<td bgcolor="#159C91" style="padding: 30px 30px 30px 30px;">
							<table border="0" cellpadding="0" cellspacing="0" width="100%">
								<tr>
									<td style="color: #ffffff; font-family: Arial, sans-serif; font-size: 14px;" width="75%">
										&reg; 21CT 2014<br/>
									</td>
									<td align="right" width="25%">
										<table border="0" cellpadding="0" cellspacing="0">
											<tr>
												<td style="font-family: Arial, sans-serif; font-size: 12px; font-weight: bold;">
													<a href="http://www.21ct.com" style="color: #ffffff;">
														<img src="lynxeonlogo" alt="Twitter" width="38" height="38" style="display: block;" border="0" />
													</a>
												</td>
												<td style="font-size: 0; line-height: 0;" width="20">&nbsp;</td>
												<td style="font-family: Arial, sans-serif; font-size: 12px; font-weight: bold;">
													<a href="http://www.21ct.com" style="color: #ffffff;">
														<img src="torchlogo" alt="Facebook" width="38" height="38" style="display: block;" border="0" />
													</a>
												</td>
											</tr>
										</table>
									</td>
								</tr>
							</table>
						</td>
					</tr>
				</table>
			</td>
		</tr>
	</table>
</body>
</html>


I have a VF Email template that is using a custom formula field to grab the thread ID for a case.

An example of my thread ID is: ref:_00D708Lra._50070koi90:ref

The formula that I am using to generate the thread ID is:

"ref:_00D"&MID(Id,4,1)&"0"&RIGHT($Organization.Id, 4) &"._"& LEFT(Id,4)&"0"&RIGHT(Id,5) &":ref"



I tested by sending a blank email with the thread ID in the subject and the body of the message. No case is opened by SalesForce, which is good as there shouldnt be a new case opened, but the email is never added to the case as a comment. The email just sort of dissapears into nowhere.

Can someone please help me with this?


I am creating a visualforce email template that needs to include the case thread id in it so end users are able to reply. 

I am reading that I should be using {!Case.Thread_Id} but when I use this, I get the following error: Unknown property 'core.email.template.EmailTemplateComponentController.Case' 

If I change this to {!relatedTo.Thread_Id} then I get Invalid field Thread_Id for SObject Case


Can someone please help me on this?    I would assume if I was using default templates that SalesForce could actually just input the ThreadID for me as it is an option on the Case > Settings options page but since were using custom VF templates, this wont work.
I found several articles on building a custom login controller and custom login page for SalesForce Communities. My issue now is that I am missing the 75% code coverage mark by 2 - 3% so I am unable to deploy my new controllers to Production.

I have a CustomLogin controller with the following code:

global with sharing class CustomLoginController {
    global String username {get; set;}
    global String password {get; set;}
    global CustomLoginController () {}
    global PageReference login() {
        return Site.login(username, password, null);
    }
}

I am needing to write a unit test that will test against this code and should get me above or at least to the 75% code coverage requirement. Can someone please help me out here?

I am extremely green when it comes to programming and I have been thrust into this role at my new job.

Thanks
I created the below code for an email template. I get misc errors regarding closing tags for certain opening tags. The closing tags are present. I am not sure why this is happening.

<body style="margin: 0; padding: 0;">
	<table border="0" cellpadding="0" cellspacing="0" width="100%">	
		<tr>
			<td style="padding: 10px 0 30px 0;">
				<table align="center" border="0" cellpadding="0" cellspacing="0" width="600" style="border: 1px solid #cccccc; border-collapse: collapse;">
					<tr>
						<td align="center" bgcolor="#fff" style="padding: 40px 0 30px 0; color: #153643; font-size: 28px; font-weight: bold; font-family: Arial, sans-serif;">
							<img src="21CT_Color_75x75.png" alt="21CT Support" width="75" height="75" style="display: block;" />
						</td>
					</tr>
					<tr>
						<td bgcolor="#ffffff" style="padding: 40px 30px 40px 30px;">
							<table border="0" cellpadding="0" cellspacing="0" width="100%">
								<tr>
									<td style="color: #153643; font-family: Arial, sans-serif; font-size: 24px;">
										<b>A new case has been opened for you</b>
									</td>
								</tr>
								<tr>
									<td style="padding: 20px 0 30px 0; color: #153643; font-family: Arial, sans-serif; font-size: 16px; line-height: 20px;">
										
										Dear {!Case.Contact,Sir or Madam}, </p>

  										Thank you for contacting 21CT Support. </p>

  										A new case has been created and assigned to a member of the 21CT Support team. Your case number is {!Case.Id}. </p>

 										If this case was opened via email, a member of the 21CT Support team will be contacting you shortly. If you have already spoken with a member of our support team, please feel free to respond to this email with any additional information or questions you may have regarding your support issue. </p>

  										<br/>
    									<br/>
    									<br/>
  										<br/>
    									<br/>
    									<br/>

  										<small >**When responding, please do not edit any existing text already placed in the email as this helps us track of your case.</small>

									</td>
								</tr>
								<tr>
								</tr>
							</table>
						</td>
					</tr>
					<tr>
						<td bgcolor="#159C91" style="padding: 30px 30px 30px 30px;">
							<table border="0" cellpadding="0" cellspacing="0" width="100%">
								<tr>
									<td style="color: #ffffff; font-family: Arial, sans-serif; font-size: 14px;" width="75%">
										&reg; 21CT 2014<br/>
									</td>
									<td align="right" width="25%">
										<table border="0" cellpadding="0" cellspacing="0">
											<tr>
												<td style="font-family: Arial, sans-serif; font-size: 12px; font-weight: bold;">
													<a href="http://www.21ct.com" style="color: #ffffff;">
														<img src="lynxeonlogo" alt="Twitter" width="38" height="38" style="display: block;" border="0" />
													</a>
												</td>
												<td style="font-size: 0; line-height: 0;" width="20">&nbsp;</td>
												<td style="font-family: Arial, sans-serif; font-size: 12px; font-weight: bold;">
													<a href="http://www.21ct.com" style="color: #ffffff;">
														<img src="torchlogo" alt="Facebook" width="38" height="38" style="display: block;" border="0" />
													</a>
												</td>
											</tr>
										</table>
									</td>
								</tr>
							</table>
						</td>
					</tr>
				</table>
			</td>
		</tr>
	</table>
</body>
</html>