• Srinivas Annam
  • NEWBIE
  • 74 Points
  • Member since 2016

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 23
    Questions
  • 14
    Replies
Hi,
I want to implement one app related sales representatives route tracking (route map), based on google Api. i have displayed map based on google api.but my requirement is, display route map based on sales reps location/movement (they need to open salesforce1 app in their mobile or tab).based on their location latitude and langitude we need to dispaly route in desktop.
please help me regarding this,this is urgent requirement.
Thanks in advance.

 
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 need to create an automated tasks based on task created date. 

For example. Task create date is 20/07/2016 , Here i want create another task after 15 days but here I need to check the business days. I need to exclude the saturday and sunday.

Please let me  know how to acheive this.
 
My requirement is generate pdf and send email with attachment to contacts related to  specific or all accounts.
but i got one error ,plz can you check below code...

generatepdf:

<apex:page standardController="Account" recordSetVar="acc" renderAs="pdf">
<apex:form >
<h1 style="font-size:17px;text-align:center">PDF Generation Example</h1>
<p style="font-family:Arial,Gadget,sans-sarief;font-size:15px"> This is the Example of pfd creating pdf and integrated with Html,css Advance Example will be shown </p>
<body>
<div>
<table style="border-collapse:collapse;width=100%;font-family:rebuchet,MS,arial,sans-serief;">
<tbody style="display:table-row-group;vertical-align:middle;">
<tr style="display:table-row;">
            <th style="font-size:1 em;text-align:left;padding-top:5px;padding-bottom:4px;padding:3px 7px 2px 7px;background-color:#A7c942;color:#fff;border:1px solid #98bf21">Company Name</th>
            <th style="font-size:1 em;text-align:left;padding-top:5px;padding-bottom:4px;padding:3px 7px 2px 7px;background-color:#A7c942;color:#fff;border:1px solid #98bf21">Contact Number</th>
            <th style="font-size:1 em;text-align:left;padding-top:5px;padding-bottom:4px;padding:3px 7px 2px 7px;background-color:#A7c942;color:#fff;border:1px solid #98bf21">Compan Type</th>
          
</tr>
<apex:repeat value="{!acc}" var="a">
<tr>
<td style="font-size:1 em;border:1px solid #98bf21;padding 3px 7px 2px 7px;border-collapse:collapse;">{!a.Name}</td>
<td style="font-size:1 em;border:1px solid #98bf21;padding 3px 7px 2px 7px;border-collapse:collapse">{!a.AccountNumber}</td>
<td style="font-size:1 em;border:1px solid #98bf21;padding 3px 7px 2px 7px;border-collapse:collapse">{!a.Type}</td>
</tr>
</apex:repeat>
</tbody>
</table>
</div>
<div style="padding-top:30px;line-hieght:24px;">
<h8 style="font-size:17px;">Thanks and Regards</h8><br/>
<span style="font-size:17px;font-weight:bold;font-family:britannic bold,serif;color:#11ff11">Code</span>
<span style="font-size:17px;font-weight:bold;font-family:britannic bold,serif;color:#008899">For</span>
<span style="font-size:17px;font-weight:bold;font-family:britannic bold,serif;color:Blue">PDF Generation</span>

</div>
</body>
</apex:form>
 
</apex:page>

sendpdfemail:

<apex:page controller="pdfsendcls">
<apex:messages />
        <apex:form >
        <apex:pageBlock title="Send Email Example.Send to the related contacts Email of the Account :{!acc.Name}">
<p> This is the example of the sending email from the salesforce by generating Attachment from a visualforce page</p>
        <apex:pageBlockTable value="{!acc.contacts}" var="c"> 
                <apex:column headerValue="Name">{!c.Name}</apex:column>
                <apex:column headerValue="Email">{!c.Email}</apex:column>
        </apex:pageBlockTable>
    <apex:outputLabel for="subject" value="Subject">:<br/></apex:outputLabel>
    <apex:inputtext size="80" maxlength="80" id="subject"/><br/><br/><br/>
        <apex:outputLabel for="Body" value="Body">:<br/></apex:outputLabel>
    <apex:inputtextarea cols="80" rows="8" id="body"/><br/><br/>
    
    <apex:commandButton value="Send Email" action="{!SendEmail}"/>
</apex:pageBlock>
          </apex:form>
   </apex:page>

pdfsendcls:

public with sharing class pdfsendcls {
    public Account acc { get; set; }
    public string eSubject{get;set;}
    public string eBody{get;set;}
    public string htmlBody{get;set;} 
            public pdfsendcls(){
            //acc=[select Name,(select name,id,email from account.contacts) from account where Id =:contact.AccountId];
            acc=[select Name,(select name,id,email from account.contacts where AccountId='0012800000hlgnC') from account where Id ='0012800000hlgnC'];//:ApexPages.CurrentPage().getparameters().get('id')];
        //    acc=[SELECT Id, Name,Email FROM Account WHERE Id IN (SELECT AccountId FROM Contact WHERE Email!= null)];
        //acc=[SELECT FirstName, email from Contact where AccountID =:contact.AccountId];
            
            }

            public PageReference SendEmail(){
                Messaging.singleEmailMessage msg=new Messaging.singleEmailMessage();
                PageReference pdfexample=page.generatepdf;
                pdfexample.setRedirect(true);
                Blob b=pdfexample.getContent();
                Messaging.EmailFileAttachment fa=new Messaging.EmailFileAttachment();
                fa.setFileName('pdfAttachment.pdf');
                fa.setBody(b);
                String eaddress;
           if(acc.contacts[0].Email!=null){
                eaddress=acc.Contacts[0].Email;
                for(integer i=1;i<acc.Contacts.Size();i++){
            if(acc.contacts[i].Email!=null){
            eaddress+=':'+acc.contacts[i].Email;
                                }
            
                        }
                        system.debug('-----------+1'+eaddress);
                    }
                  String[] toAddress=eaddress.split(':',0);//new String[]{acc};
                  //toAddress.add(eaddress[i]);
                  msg.setSubject(eSubject);
                  msg.setPlainTextBody(eBody);
                  msg.setHtmlBody(htmlBody);
                  msg.setToAddresses(toAddress);
                  msg.setFileAttachments(new messaging.EmailFileAttachment[]{fa});
                  //Now sending An email...
                 Messaging.SendEmailResult[] result=Messaging.sendEmail(new Messaging.singleEmailMessage[]{msg});
                  if (result[0].success) {
                      System.debug('The email was sent successfully.');
                      } else {
                          System.debug('The email failed to send: '+ result[0].errors[0].message);
}
            return null;
            }

    
}


but when i click on submit button i got this error,any one can help me...


Visualforce Error:

Help for this Page
System.EmailException: SendEmail failed. First exception on row 0; first error: REQUIRED_FIELD_MISSING, Either the plain text body or html body must be supplied.: []
Error is in expression '{!SendEmail}' in component <apex:commandButton> in page sendpdfemail: Class.pdfsendcls.SendEmail: line 41, column 1
Class.pdfsendcls.SendEmail: line 41, column 1

Thanks in Advance...
My requirement is, i want to create floor plan of real estate, just like book my show.i want to show available plots with green and booking plots with red so,i want to show total 100 or 1000 plots.then if i want to implement 1000 buttons wise code is not the correct so,i want take buttons in loop so,  how i can implement this through visual force page.this is urgent requirement plz help me.and again if we open booking plots visible in color and when am booking then i want to calculate the value to the plots.
Hello, I manage reservations of plots in real estate with a Visual Force page that shows the floor plan with all the seats (green = free, occupied = red). You could do? in what way? How can i develope? plz help me urgent... thanks so much.
How to create buttons in visulforce page, like ticket booking, in bookmy show.when we click on the button the popup window will open to fill customer details plz any body help urget.
Hai,Any one write Spring 16 App Builder  maintenance Exam...which type of Questions we can face?How to prepare...
How to implement and deployee code from Force.com IDE,plz any one can help steps wise ...
when you are select values in a multi select picklist, it will not take more than 3 values,when you are select 4th value that can throw validation error msg.how can i write validation rule to this?
I want to develope vf page related to sobject account with one text field(name) and one submit button.
whenever we enter a name and click that submit button,then duplicate name related total account records will display with child object contact records(eg:Acconut-->contact) but child records inside those parent records only(Ex:srinivas having 10 contacts if you submit srinivas name that display srinivas name with 10 contacts in one record only).
    
I have 11000 records in one object,i want to delete 1000 records from those because of wrong phn numbers, without affecting to remaining how it is possible through dataloader only?
whenever we visit a page,update the record in database (increment the value) without click any button,how to implement this through coding?and which database we can use?which database give the support in saleforce?
from vf page we can implement three fields firstname,lastname,designation and one submit button.
whenever we click submit button the values will store in object as well as display below to the fields as records.how can we achieve this through coding.
already report scheduling is there even though why we use batch apex?what are the differences are there between report schedular and batch apex?what is out of box functionanlity?
How i can insert record from vf page without using controller?
I need to create an automated tasks based on task created date. 

For example. Task create date is 20/07/2016 , Here i want create another task after 15 days but here I need to check the business days. I need to exclude the saturday and sunday.

Please let me  know how to acheive this.
 
My requirement is generate pdf and send email with attachment to contacts related to  specific or all accounts.
but i got one error ,plz can you check below code...

generatepdf:

<apex:page standardController="Account" recordSetVar="acc" renderAs="pdf">
<apex:form >
<h1 style="font-size:17px;text-align:center">PDF Generation Example</h1>
<p style="font-family:Arial,Gadget,sans-sarief;font-size:15px"> This is the Example of pfd creating pdf and integrated with Html,css Advance Example will be shown </p>
<body>
<div>
<table style="border-collapse:collapse;width=100%;font-family:rebuchet,MS,arial,sans-serief;">
<tbody style="display:table-row-group;vertical-align:middle;">
<tr style="display:table-row;">
            <th style="font-size:1 em;text-align:left;padding-top:5px;padding-bottom:4px;padding:3px 7px 2px 7px;background-color:#A7c942;color:#fff;border:1px solid #98bf21">Company Name</th>
            <th style="font-size:1 em;text-align:left;padding-top:5px;padding-bottom:4px;padding:3px 7px 2px 7px;background-color:#A7c942;color:#fff;border:1px solid #98bf21">Contact Number</th>
            <th style="font-size:1 em;text-align:left;padding-top:5px;padding-bottom:4px;padding:3px 7px 2px 7px;background-color:#A7c942;color:#fff;border:1px solid #98bf21">Compan Type</th>
          
</tr>
<apex:repeat value="{!acc}" var="a">
<tr>
<td style="font-size:1 em;border:1px solid #98bf21;padding 3px 7px 2px 7px;border-collapse:collapse;">{!a.Name}</td>
<td style="font-size:1 em;border:1px solid #98bf21;padding 3px 7px 2px 7px;border-collapse:collapse">{!a.AccountNumber}</td>
<td style="font-size:1 em;border:1px solid #98bf21;padding 3px 7px 2px 7px;border-collapse:collapse">{!a.Type}</td>
</tr>
</apex:repeat>
</tbody>
</table>
</div>
<div style="padding-top:30px;line-hieght:24px;">
<h8 style="font-size:17px;">Thanks and Regards</h8><br/>
<span style="font-size:17px;font-weight:bold;font-family:britannic bold,serif;color:#11ff11">Code</span>
<span style="font-size:17px;font-weight:bold;font-family:britannic bold,serif;color:#008899">For</span>
<span style="font-size:17px;font-weight:bold;font-family:britannic bold,serif;color:Blue">PDF Generation</span>

</div>
</body>
</apex:form>
 
</apex:page>

sendpdfemail:

<apex:page controller="pdfsendcls">
<apex:messages />
        <apex:form >
        <apex:pageBlock title="Send Email Example.Send to the related contacts Email of the Account :{!acc.Name}">
<p> This is the example of the sending email from the salesforce by generating Attachment from a visualforce page</p>
        <apex:pageBlockTable value="{!acc.contacts}" var="c"> 
                <apex:column headerValue="Name">{!c.Name}</apex:column>
                <apex:column headerValue="Email">{!c.Email}</apex:column>
        </apex:pageBlockTable>
    <apex:outputLabel for="subject" value="Subject">:<br/></apex:outputLabel>
    <apex:inputtext size="80" maxlength="80" id="subject"/><br/><br/><br/>
        <apex:outputLabel for="Body" value="Body">:<br/></apex:outputLabel>
    <apex:inputtextarea cols="80" rows="8" id="body"/><br/><br/>
    
    <apex:commandButton value="Send Email" action="{!SendEmail}"/>
</apex:pageBlock>
          </apex:form>
   </apex:page>

pdfsendcls:

public with sharing class pdfsendcls {
    public Account acc { get; set; }
    public string eSubject{get;set;}
    public string eBody{get;set;}
    public string htmlBody{get;set;} 
            public pdfsendcls(){
            //acc=[select Name,(select name,id,email from account.contacts) from account where Id =:contact.AccountId];
            acc=[select Name,(select name,id,email from account.contacts where AccountId='0012800000hlgnC') from account where Id ='0012800000hlgnC'];//:ApexPages.CurrentPage().getparameters().get('id')];
        //    acc=[SELECT Id, Name,Email FROM Account WHERE Id IN (SELECT AccountId FROM Contact WHERE Email!= null)];
        //acc=[SELECT FirstName, email from Contact where AccountID =:contact.AccountId];
            
            }

            public PageReference SendEmail(){
                Messaging.singleEmailMessage msg=new Messaging.singleEmailMessage();
                PageReference pdfexample=page.generatepdf;
                pdfexample.setRedirect(true);
                Blob b=pdfexample.getContent();
                Messaging.EmailFileAttachment fa=new Messaging.EmailFileAttachment();
                fa.setFileName('pdfAttachment.pdf');
                fa.setBody(b);
                String eaddress;
           if(acc.contacts[0].Email!=null){
                eaddress=acc.Contacts[0].Email;
                for(integer i=1;i<acc.Contacts.Size();i++){
            if(acc.contacts[i].Email!=null){
            eaddress+=':'+acc.contacts[i].Email;
                                }
            
                        }
                        system.debug('-----------+1'+eaddress);
                    }
                  String[] toAddress=eaddress.split(':',0);//new String[]{acc};
                  //toAddress.add(eaddress[i]);
                  msg.setSubject(eSubject);
                  msg.setPlainTextBody(eBody);
                  msg.setHtmlBody(htmlBody);
                  msg.setToAddresses(toAddress);
                  msg.setFileAttachments(new messaging.EmailFileAttachment[]{fa});
                  //Now sending An email...
                 Messaging.SendEmailResult[] result=Messaging.sendEmail(new Messaging.singleEmailMessage[]{msg});
                  if (result[0].success) {
                      System.debug('The email was sent successfully.');
                      } else {
                          System.debug('The email failed to send: '+ result[0].errors[0].message);
}
            return null;
            }

    
}


but when i click on submit button i got this error,any one can help me...


Visualforce Error:

Help for this Page
System.EmailException: SendEmail failed. First exception on row 0; first error: REQUIRED_FIELD_MISSING, Either the plain text body or html body must be supplied.: []
Error is in expression '{!SendEmail}' in component <apex:commandButton> in page sendpdfemail: Class.pdfsendcls.SendEmail: line 41, column 1
Class.pdfsendcls.SendEmail: line 41, column 1

Thanks in Advance...
How to create buttons in visulforce page, like ticket booking, in bookmy show.when we click on the button the popup window will open to fill customer details plz any body help urget.
Hi, I am having trouble with the "Attributes and Expressions" module from trailhead.

Here is the challenge:
Create a Lightning Component to display a single item for your packing list.
  • Create a component called campingListItem that displays the name (ui:outputText) and the three custom fields using the appropriate output components.
  • Add an attribute named 'item' for type Camping_Item__c.
I created an component named campingListItem and this is the code:
<aura:component >
    <aura:attribute name="item" type="<my_domain>__Camping_Item__c"/>
    
    <ui:outputText value="{!v.item.Name}"/>
    <ui:outputCheckbox value="{!v.item.<my_domain>__Packed__c}"/>
    <ui:outputCurrency  value="{!v.item.<my_domain>__Price__c}"/>
    <ui:outputNumber value="{!v.item.<my_domain>__Quantity__c}"/>
</aura:component>

The error that I am getting is: "Challenge Not yet complete... here's what's wrong: 
The packingListItem Lightning Component's attribute tag doesn't exist or its attributes are not set correctly."

With this, I tried to create another component, with the name "packingListItem", but It didn't work.

Can anyone help me?

Thanks,

Hi All ,

Which tool can automatically prevent duplicate records?
A. Import Wizard
B. Connect for Office
C. Excel Connector
D. Data Loader

Help me to choose right ans.


Regards ,
Darshan Desai

 
Hai,Any one write Spring 16 App Builder  maintenance Exam...which type of Questions we can face?How to prepare...
from vf page we can implement three fields firstname,lastname,designation and one submit button.
whenever we click submit button the values will store in object as well as display below to the fields as records.how can we achieve this through coding.
I hv 10 classes and 1 trigger,code coverage is 95 %.I write Test classes for 9 classes and 1 trigger,(but not write test class for 1 class) (or) I write Test classes for 10 classes,( but not write test class for trigger).
 Is it possible to deployee the code to production.