• SMARTIE
  • 1914 Points
  • Member since 

  • Chatter
    Feed
  • 54
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 0
    Questions
  • 312
    Replies
public class EmailManager {
    
    public static sendEmail(String address, String subject, String body)
    {
        Messaging.SingleEmailMessage mail= new Messaging.SingleEmailMessage();
        string[] toAddresses= new string[] {address};
            mail.setToAddresses(toAddresses);
        mail.setSubject(subject);
        mail.setPlainTextbody(body);
        
        Messaging.SendEmailResult[] results = Messaging.sendEmail(new Messaging.SingleEmailMessage[] {mail});
        inspectResults(results);
            
    }
    private static boolean inspectResults(Messaging.SendEmailResult[] results)
    {
        Boolean sendResult = true;
        
        for(Messaging.SendEmailResult res:results)
        {
            if(res.isSuccess())
            {
                System.debug('Email sent successfully');
            }
            else{
                sendResult=false;
                system.debug('The following errors occured: '+res.getErrors());
            }  
        }
        return sendResult;
    }
    }
    

 
I have 1 field called contact no in student obj actually mobile no 10 digits right if i enter more than 10 digits i want to show error message using validations how can i approach this can anyone help me .
Adv thanks 
Hello!  I'm not sure where to go for help resetting a login.  I have tried to create a Developer Edition using all 3 of my email addresses but I still get the "Houston, we have a problem" error message.  Any thoughts on who I should contact so I can login and use the modules?  We have Premier.

Thanks!

 
Hi All,

What is a Sandbox?
What is a Production?
What is the difference between Sandbox & Production?
What are the different types of sandboxes and uses?
Hi, 

I'm trying to contvert this HTML code to visaulforcepage, please help me convert the following- 
<apex:page standardController="Opportunity"  renderAs="pdf">
    <center>
		<table width="100%" style="font-family: Arial, Helvetica, sans-serif; border-collapse: collapse;"
        cellpadding="5"> </center>
        <tr>
            <td colspan="4" style="font-size: x-large; font-weight: bold">
                {!Opportunity.Account.Name}
            </td>
        </tr>
        <tr>
            <td colspan="4">
            </td>
        </tr>
        <tr>
            <td colspan="4" style="font-weight: bold; border-bottom-style: solid; border-bottom-width: thick;
                border-bottom-color: #30b55a;">
                Campaign Information 
            </td>
        </tr>
        <tr>
            <td align="right" style="color: #808080; border-right-style: solid; border-right-width: thin;
                border-right-color: #30b55a;">
                Campaign Name 
            </td>
            <td style="font-weight: normal">
                {!Opportunity.Name}
            </td>
            <td align="right" style="color: #808080; border-right-style: solid; border-right-width: thin;
                border-right-color: #30b55a;">
                Brand
            </td>
            <td style="font-weight: normal">
                {!Opportunity.Brands_Test__c}
            </td>
        </tr>
        <tr>
            <td align="right" style="color: #808080; border-right-style: solid; border-right-width: thin;
                border-right-color: #30b55a;">
                Start Date
            </td>
            <td style="font-weight: normal">
				<apex:outputText value="{0,date,MM'/'dd'/'yyyy}">
                <apex:param value="{!Opportunity.Campaign_Start_Date__c}" /> 
				</apex:outputText>
            </td>
            <td align="right" style="color: #808080; border-right-style: solid; border-right-width: thin;
                border-right-color: #30b55a;">
                End Date
            </td>r
            <td style="font-weight: normal">
                <apex:outputText value="{0,date,MM'/'dd'/'yyyy}">
                    <apex:param value="{!Opportunity.Campaign_End_Date__c}" /> 
                </apex:outputText>
            </td>
        </tr>
        <tr>
            <td align="right" style="color: #808080; border-right-style: solid; border-right-width: thin;
                border-right-color: #30b55a;">
                Duration 
            </td>
            <td style="font-weight: normal">
                {!Opportunity.Campaign_Duration__c}
            </td>
            <td align="right" style="color: #808080; border-right-style: solid; border-right-width: thin;
                border-right-color: #30b55a;">
                Geo
            </td>
            <td style="font-weight: normal">
                {!Opportunity.Targeting_Country__c} 
            </td>
        </tr>
        
        <tr>
            <td colspan="4">
                &nbsp;
            </td>
        </tr>
		
        <tr>
            <td colspan="4" style="font-weight: bold; border-bottom-style: solid; border-bottom-width: thick;
                border-bottom-color: #30b55a;">
                Mobile Spots - {!Opportunity.Mobile_Spots_B__c}
            </td>
        </tr>
        <tr>
            <td align="right" style="color: #808080; border-right-style: solid; border-right-width: thin;
                border-right-color: #30b55a;">
                Audio Ads 
            </td>
            <td style="font-weight: normal">
				{!Opportunity.Mobile_Spots_B__c}
            </td>
           
        </tr>
        <tr>
            <td align="right" style="color: #808080; border-right-style: solid; border-right-width: thin;
                border-right-color: #30b55a;">
                Companion Banner
            </td>
            <td style="font-weight: normal">
				{!Opportunity.Mobile_Companion_Banner__c}
            </td>
        </tr>
        <tr>
            <td align="right" style="color: #808080; border-right-style: solid; border-right-width: thin;
                border-right-color: #30b55a;">
                Display Impression
            </td>
            <td style="font-weight: normal">
				{!Opportunity.Mobile_Display_Impression__c}
            </td>
        </tr>
        <tr>
            <td align="right" style="color: #808080; border-right-style: solid; border-right-width: thin;
                border-right-color: #30b55a;">
                Interstitial
            </td>
            <td style="font-weight: normal">
				{!Opportunity.Moblie_Interstitial__c}
            </td>
        </tr>
		
        <tr>
            <td colspan="4">
                &nbsp;
            </td>
        </tr>
		
       
        <tr>
            <td colspan="4" style="font-weight: bold; border-bottom-style: solid; border-bottom-width: thick;
                border-bottom-color: #30b55a;">
                Web Spots - {!Opportunity.Web_Spots_B__c}
            </td>
        </tr>
        <tr>
            <td align="right" style="color: #808080; border-right-style: solid; border-right-width: thin;
                border-right-color: #30b55a;">
                Audio Ads 
            </td>
            <td style="font-weight: normal">
				{!Opportunity.Web_Spots_B__c}
            </td>
           
        </tr>
        <tr>
            <td align="right" style="color: #808080; border-right-style: solid; border-right-width: thin;
                border-right-color: #30b55a;">
                Companion Banner
            </td>
            <td style="font-weight: normal">
				{!Opportunity.Web_Spots_B__c}
            </td>
        </tr>
        <tr>
            <td align="right" style="color: #808080; border-right-style: solid; border-right-width: thin;
                border-right-color: #30b55a;">
                Display Impression
            </td>
            <td style="font-weight: normal">
				{!Opportunity.Web_Display_Impression__c}
            </td>
        </tr>
        <tr>
            <td align="right" style="color: #808080; border-right-style: solid; border-right-width: thin;
                border-right-color: #30b55a;">
                Interstitial
            </td>
            <td style="font-weight: normal">
				{!Opportunity.Web_Interstitial__c}
            </td>
        </tr>
		
        <tr>
            <td colspan="4">
                &nbsp;
            </td>
        </tr>
		
        <tr>
            <td colspan="4" style="font-weight: bold; border-bottom-style: solid; border-bottom-width: thick;
                border-bottom-color: #30b55a;">
                Total
        </tr>
        <tr>
            <td align="right" style="color: #808080; border-right-style: solid; border-right-width: thin;
                border-right-color: #30b55a;">
                Spots
            </td>
            <td style="font-weight: normal">
				{!Opportunity.Total_Spot_Booked__c}
            </td>
        </tr>
        <tr>
            <td align="right" style="color: #808080; border-right-style: solid; border-right-width: thin;
                border-right-color: #30b55a;">
                Approx. Impressions 
            </td>
            <td style="font-weight: normal">
				{!Opportunity.Total_Impressions__c}
            </td>
        </tr>
        <tr>
            <td colspan="4">
                &nbsp;
            </td>
        </tr>
	    <tr>
	        <td colspan="4" style="font-size: medium; font-weight: normal">
				Note: Spots will be spread out on the Mobile Playlist, Saavn Radio and ROS.        
			</td>
	    </tr>
		
        <tr>
            <td colspan="4">
                &nbsp;
            </td>
        </tr>
		
        <tr>
            <td colspan="4" style="font-size: medium; font-weight: bold">
				<font color ="blue"> Deliverables from {!Opportunity.Account} </font>
            </td>
        </tr>
        <tr>
            <td colspan="4" style="font-size: medium; font-weight: normal">
				<font color ="blue"> {!Opportunity.Campaign_Comments__c} </font>
            </td>
        </tr>
		
        <tr>
            <td colspan="4">
                &nbsp;
            </td>
        </tr>
		
        <tr>
            <td colspan="4" style="font-size: medium; font-weight: bold">
		Confidentiality:	 	 	 	 
            </td>
        </tr>
		
        <tr>
            <td colspan="4" style="font-size: medium; font-weight: normal">
		<p> The parties involved acknowledge and agree that this term sheet, its material terms and conditions and any other information 
			<br> 
		disclosed by one party to the other party in connection with this proposal or negotiation of the agreement is Confidential Information.</p>
		</br> 
            </td>
        </tr>
		
        <tr>
            <td colspan="4" style="font-size: medium; font-weight: bold">
		
		Above terms agreed to by:
            </td>
        </tr>

        <tr>
            <td colspan="4" style="font-size: medium; font-weight: normal">
		<br></br>
		Name:							____________________________________________________________________________________
		<br></br> Designation:						____________________________________________________________________________________

		<br></br> Company Name:				____________________________________________________________________________________ 
		
		<br></br> Email Address:				____________________________________________________________________________________ 
		
		<br></br> Mailing Address and Contact Details: ____________________________________________________________________________________ 
		
		<br></br> Signature:							____________________________________________________________________________________ 
		
		<br></br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
			&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
			&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
			&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
			&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
			&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
			&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
			&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
			Date
        <tr>
            <td colspan="4" style="font-size: medium; font-weight: bold">
		Above terms agreed to by (For Saavn LLC):
            </td>
        </tr>
		
        <tr>
            <td colspan="4" style="font-size: medium; font-weight: normal">
		<br></br> Name:								____________________________________________________________________________________ 
		
		<br></br> Designation:						____________________________________________________________________________________
		
		<br></br> Signature:							____________________________________________________________________________________
		<br></br>
			&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
			&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
			&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
			&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
			&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
			&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
			&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
			&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
			Date		 																								
            </td>
        </tr>
		
    </table>
    
</apex:page>
Thank You!
 
Hi,
   I have Employee class and its having 4 methods.. i have another class name is Manager. So i want to access Employee class methods in Manager class . can you tell me how to achieve this ?

 
HI All,


What is an escalation rule?
When we are going to use an escalation rule?
can any one give one example for this topic....
Hi,

I have a requirement to capture an image in visual force page either from computer or through Camera(Webcam/phone camera/tablet camera). What all frameworks/technologies that we have to implement in visual force page to accomplish this.

Thanks
Siva
  • July 21, 2016
  • Like
  • 0
how can we display the opportunites account related list along with oppetunity name can any one answer this question please?
Hi

 Iam so Much Confused With Delete and undelete trigger operations .Can any one tell the relationship between them .Also why dont salesforce BEFORE UNDELETE operation ...
I am quite new for salesforce. How can I change the visualforce page to a public one? Thank you for your help. 
To pass this challenge, create an Apex class that inserts a new account named after an incoming parameter. If the account is successfully inserted, the method should return the account record. If a DML exception occurs, the method should return null.
  • The Apex class must be called 'AccountHandler' and be in the public scope.
  • The Apex class must have a public static method called 'insertNewAccount'.
  • The 'insertNewAccount' method must accept an incoming string as a parameter, name the account after the parameter, insert it into the system and then return the account record.
    • The 'insertNewAccount' method must also accept an empty string, catch the failed DML and return null.
User-added image
public class AccountHandler {
    public static Account insertNewAccount (String acName){
    if(acName!=''){    
        try{
            Account a = new Account(Name=acName);
            insert a;
            System.debug('Account created');
            return a;
        } catch(Exception e){
            System.Debug('Account not created');
            return null;
        }
    } else {
        return null;
    }
     
        
    }    
}

 
Hello, 

when checking the challenge related to the trailhead in the subject I get the following error:

There was an unhandled exception. Please reference ID: SLSTSMQD. Error: Faraday::ClientError. Message: INVALID_TYPE: VAT_Rate__c, MasterLabel from VAT_Data__mdt ^ ERROR at Row:1:Column:43 sObject type 'VAT_Data__mdt' is not supported. If you are attempting to use a custom object, be sure to append the '__c' after the entity name. Please reference your WSDL or the describe call for the appropriate names.

Might it be related to the fact that in my Dev Org it is enabled the namespace prefix?

Thanks and Kind Regards,
Giovanni
Create a class called 'ParkLocator' that has a 'country' method that uses the 'ParkService' class and returns an array of available park names for a particular country passed to the web service. Possible country names that can be passed to the web service include Germany, India, Japan and United States.

i have used the ParkLocator.. but i am getting an error that "The Apex class 'ParkLocator' does not appear to be calling the SOAP endpoint."

could any one help me plz....
Hi All,
I'm new to salesforce and started working on Trailhead's. I facing issue with the Trigger Challenge. Here is the triger code im writing 

trigger AccountAddressTrigger on Account (before insert) {
    for(Account a : Trigger.new){
        if(a.Match_Billing_Address__c && a.BillingPostalCode != null){
            a.ShippingPostalCode = a.BillingPostalCode;
        }
    }
    
}

but i'm getting the following error. Not sure where i'm doing wrong. can someone please help me here. Thanks in advance.

System.DmlException: Insert failed. First exception on row 0; first error: CANNOT_INSERT_UPDATE_ACTIVATE_ENTITY, TestTrigger: execution of AfterInsert caused by: System.NullPointerException: Attempt to de-reference a null object Trigger.TestTrigger: line 3, column 1: []
Specifically for "Customize How Records Get Approved with Approvals" trail. When I am submitting the challenge. Each time getting an error as:- "Looks like something went wrong, please try again later."

Note:- I am already using a new developer org.
b) Completely logged out multiple times.

Can anyone suggest me the next steps?
Thanks. :)
Hi,
In our application we have integrated cases using the "Contacts" object. Now one of our clients is asking for cases integration with person accounts. I have read some articles about person accounts and found that it is not enabled by default in developer edition. I want to enable person accounts in salesforce developer edition. What exactly I need to do to enable the person accounts. Please help me.
  • September 02, 2016
  • Like
  • 0
Hello All,

Please suggest me how to learn salesforce step by step.

Kindly provide me step by step Process.

Thanks & Regards,
Hemansh Patel
I am getting the following error in "Customizing Compact Layouts" section of "Salesforce1 Mobile Basics" unit in Admin Beginner trail.

"Challenge Not yet complete... here's what's wrong:
There was an unexpected error while verifying this challenge. Usually this is due to some pre-existing configuration or code in the challenge Org. We recommend using a new Developer Edition (DE) to check this challenge. If you're using a new DE and seeing this error, please post to the developer forums and reference error id: MXFFWICC
Create and enable a compact layout."
I have a web-site with a number (hundreds) of HTML documentation pages.

I am tying to make this help available within sales force.

It seems logical to zip up all of these web pages and post them in a static resource.    Then reference the individual pages from the index page using the URLFOR process.   When using {URLFOR()} the resulting page is blank.   I believe is correctly pointing to the correct resource because if I back out the file name from the URL Sales Force downloads the entire ZIP file to me.     So I believe the syntax I am using is just slightly off.    
<a name="SomeName" href="{!URLFOR($Resource.DOCS,'SomePage.htm')}" target="showframe">SomeDescription</a>
What happens when this link is clicked is that it renders a blank page.

Any Suggestions / Examples would be greatly appreciated.
 
public class EmailManager {
    
    public static sendEmail(String address, String subject, String body)
    {
        Messaging.SingleEmailMessage mail= new Messaging.SingleEmailMessage();
        string[] toAddresses= new string[] {address};
            mail.setToAddresses(toAddresses);
        mail.setSubject(subject);
        mail.setPlainTextbody(body);
        
        Messaging.SendEmailResult[] results = Messaging.sendEmail(new Messaging.SingleEmailMessage[] {mail});
        inspectResults(results);
            
    }
    private static boolean inspectResults(Messaging.SendEmailResult[] results)
    {
        Boolean sendResult = true;
        
        for(Messaging.SendEmailResult res:results)
        {
            if(res.isSuccess())
            {
                System.debug('Email sent successfully');
            }
            else{
                sendResult=false;
                system.debug('The following errors occured: '+res.getErrors());
            }  
        }
        return sendResult;
    }
    }
    

 
I have 1 field called contact no in student obj actually mobile no 10 digits right if i enter more than 10 digits i want to show error message using validations how can i approach this can anyone help me .
Adv thanks 
Hello,

  I am having question bank. there are list of questions and their answers. I have write this in apex repeat. I want to add drag and drop functionality on this questions. Means i can able to change sequence of the question. Is it possible and how?

Thanks & Regards,
Satakshi
Hi,
I have Deleted my Salesforce Authentication in Mobile then it's effected to My salesforce org, My Salesforce org is Not Opening.
User-added image
Thanks
How to load data for a child object ? example please.
The 'Google Info' custom button was not found. Make sure that it is a Detail Page Button (not link) and that its added to the page layout. If you are still having problems, ensure that you are NOT using Record types for the Contact object. This challenge will not work with Record types so you will need to sign up for a new DE org and use that instead for this module.
Can someone tell me where did I go wrong.Please let me know.Here are my screenshots.
Thankyou:)User-added imageUser-added imageUser-added imageUser-added image
Hi,

Thanks in advance for your help here.
I have a requirement where when i have list of accounts clicking on it it should display account,contacts and related opportunities in a single visual page of a particular account clicked.
Pls note it should not go to any detaul page.
 
I have requirement Of full calender display implementation.when we click on day it will show popup's in popup we can fill imformation(events) save(client shedules).that will show to co-caller,if co-caller is post poned,because of  that day already sheduled meetings.that post poned date will show to sheduler.the total data reflected in database.And that show the events of day,week,month in bottom.after that it will show the geolocation of near by clients to us...
Already i used fullcalender plug-ins but that is not working properly.so,
This total code, how i can implement plz anybody help this urgent requirement.

Thanks in Advance.
I'm getting this error on the above trailhead:
There was an unhandled exception. Please reference ID: GTJUEWKW. Error: Faraday::ClientError. Message: INVALID_FIELD: SELECT Title, ArticleBody__c FROM Knowledge__kav ^ ERROR at Row:1:Column:15 No such column 'ArticleBody__c' on entity 'Knowledge__kav'. If you are attempting to use a custom field, be sure to append the '__c' after the custom field name. Please reference your WSDL or the describe call for the appropriate names.

Here's the screenshot:
User-added image

It seems like it can't find the "Article Body" field I created on the Knowledge article type. But here's the config details of that field:
User-added image

Any suggestions?
Hi Team,
I have created an Trial Account of Salesforce and Developer.
I got success to login and got access_token .but when i try to create new Case ,getting error  [{"message":"The REST API is not enabled for this Organization.","errorCode":"API_DISABLED_FOR_ORG"}]. Please let me know ,what is miss to configure in my trial account.
 
Hi There,

When I try to Generate Apex Class from WSDL I get the error Error: Failed to parse wsdl: Unsupported Schema element found http://www.w3.org/2001/XMLSchema:group.
the specific section it has an issue with is:


    <group name="dynamicRecipientsContent">
        <choice>
            <element name="recipientDetail" type="mir3:recipientDetailType" />
            <element name="recipient" type="mir3:recipientType" />
            <element name="recipientGroupTitle" type="string" />
            <element name="recipientScheduleTitle" type="string" />
        </choice>
    </group>
   <complexType name="dynamicRecipients2Type">
        <group ref="mir3:dynamicRecipientsContent" minOccurs="0" maxOccurs="unbounded" />
    </complexType>

Can anyone help with this?
I'm getting a message about my Access on one of my Developer Orgs:

Access Blocked
The operation you requested isn't allowed due to a security policy in your organization. Contact your administrator for more information about security policies. 

Can anyone shed light on this? I've tried the forgot password and can get to my security question, but then this message comes up.

Thanks!