• sarvesh001
  • NEWBIE
  • 205 Points
  • Member since 2013

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 69
    Questions
  • 92
    Replies
Hi All,

I want to generate vf charts and want to send that charts as pdf.

Can any one help me out for this.........
thanks,
Sarvesh.
Hi,
I want to show total value  in middle of do nut chart.
I am using belo code , it is showing value correctly but i want ot show total value in middle.
Please help for this.......................

Regards,
Sarvesh.

vf code:
<div align="center">
        <apex:chart height="350" width="450" data="{!data}" background="#FFFFFF"> 
            <apex:pieSeries tips="true" dataField="data" labelField="name" donut="50" colorSet="#088A08,#FFBF00,#2ECCFA"/> 
            <apex:legend position="bottom"/>
            
Controller code:
public with sharing class Hsbs_ChartController {
     public List<PieWedgeData> getData() 
    {  
    string aid = ApexPages.currentPage().getParameters().get('id');
        List<PieWedgeData> data = new List<PieWedgeData>();
        List<HSBS_Survey_Results__c > memb = new List<HSBS_Survey_Results__c >();  
        
        String sql = 'SELECT Name, Account__c, N_TS_Green__c,N_TS_Safe__c,N_TS_Productive__c FROM HSBS_Survey_Results__c where Account__c=:aid limit 1';
        memb = Database.Query(sql);
        for(HSBS_Survey_Results__c temp:memb)
        {                                          
            data.add(new PieWedgeData('Green'+ ' ' +temp.N_TS_Green__c,temp.N_TS_Green__c));
            data.add(new PieWedgeData('Safe'+' ' +temp.N_TS_Safe__c,temp.N_TS_Safe__c));
            data.add(new PieWedgeData('Productive'+' ' +temp.N_TS_Productive__c,temp.N_TS_Productive__c));
        } 
        return data;  
    }  
    
    // Wrapper class  
    public class PieWedgeData 
    {  
        public String name { get; set; }  
        public Decimal data { get; set; }  
        
        public PieWedgeData(String name, Decimal data) 
        {  
            this.name = name;  
            this.data = data;  
        }  
    }  
   
    
}
        
Hi All,
I am getting Session invalid or session expires error when i am caaling one saleforce org from another salesforce org.
here my code for callout.

String content = '{"Name": "Some acoount", "Phone":"9742882954"}';
     HttpRequest req = new HttpRequest();
     req.setEndpoint('https://ap1.salesforce.com/services/apexrest/Accountacc');
     req.setMethod('POST');
     
     String username = 'sarvesh01@gmail.com';
     String password = 'parvati@3';
 
     Blob headerValue = Blob.valueOf(username + ':' + password);
     String authorizationHeader = 'BASIC ' +
     EncodingUtil.base64Encode(headerValue);
     req.SetBody(content);
     req.setHeader('Content-Type', 'application/json; charset=utf-8');
     req.setHeader('Authorization', authorizationHeader);
     req.setHeader('Authorization', 'OAuth '+UserInfo.getSessionId());    
     Http http = new Http();
     HTTPResponse res = http.send(req);
     System.debug(res.getBody());


my rest class in another salesforce org.
@RestResource(urlMapping='/Accountacc/*')  
 global with sharing class callAccount {  
  
  @HttpPost  
   global static String doPost() {  
         
     RestRequest request = RestContext.request;  
     RestResponse response = RestContext.response;  
     String jSONRequestBody=request.requestBody.toString().trim();  
     Account accObj = (Account)JSON.deserializeStrict(jSONRequestBody,Account.class);  
     insert accObj;  
     return accObj.Id;  
   }  
  @HttpGet  
   global static Account doGet() {  
   
     RestRequest request = RestContext.request;  
     RestResponse response = RestContext.response;  
     String accountId = request.requestURI.substring(request.requestURI.lastIndexOf('/')+1);  
     Account acc= [SELECT Id, Name, Phone, Website FROM Account WHERE Id = :accountId];  
     return acc;  
   }  
 }


Can any one help me out please........
Thanks,
sarvesh.
HI

I want two picklist like country and states dependent picklists in vf page .I want to write client side script to chenge the picklist vales based on another pecklist value. I  achieve this byusing apex logic but i want to achive this one by using script on vf page.

Can any one help me please.....
Thanks,
Sarvesh.
 
Hi ,
I want to display recors in treeview fro three objects all three objects in relation of parent-->child--->grandchild.


Can any one help me out for this.

Thanks,
Sarvesh
Hi,
i want to show record in tree view structure for three objects.
Opportunity under this two objects oppLineitem, Invoice objects and under invoice object invoice line item object.

i wnt to show records inthree levels.

Can any one help me out for this.


Thanks,
Sarvesh.

 
Hi, 
I want to get the week number of a month from close date like week-1,week-2,week-3,week-4 in  a formula field.\

can any one help out for this .

Thanks,
Sarvesh

 
Hi ,
I want to create new contact in quick creation box i have used  custom look for account . but for contact custom lookup account is not selected .

can any one help me out for this.



Thanks,
sarvesh.
Hi All,

I want to show trre data in treeviw after clicked on button i.e my requirement is after giving account name i want to show related opportunities and opportunity items in treeviee.

I have tried treeview jquery scprits its working only when page is loaded after given acc name and clicked on button jquery is not working .
hear i have tried this http://www.infallibletechie.com/2012/11/tree-view-in-visualforce-page.html

Can any one suggest me plesese.
Thanks,
Sarvesh.
Hi all,
i want to get day name from input month and year.

Can anyone help me out for this.

Thanks,
Sarvesh.
Hi,
I want to find the the all sunday in a month based on input month name and  year.

Can anyone help me out for this.


Regards,
Sarevsh

 
Hi All,

How to merge the Html td's dynamically based on the if condition in vf page .

Can anyone help me from this.

Thanks,
Sarvesh.
Hi,

i want to show  total amount in dashboard component in budget vs actuals reports.
I.e i want to show the total amount seperately in dashboard component.

Can anyone suggest me please.


Thanks,
Sarvesh.
Hi,

I want to display record in treeview formate for costom object records in vf page.

 Please help me out for this.

Thanks,
sarvesh.
Hi ,

I want to capture the daily wise plan and actual activity for all users .

Can anyone help me out for this.

Thanks,
sarvesh.



 
Hi ,

I want to send an email alert to user that to whom this opportunity is shared.


Can any one help me out for this how to achive this.

Thanks,
Sarvesh.
Hi, 
I want to restrict clone button for profilr wise. I can do it by using pagelayout but i want to restrict based on profiles how can i  do it.

Can any one help me out for this.
Thanks,
Sarvesh.
Hi ,
I am getting formula fileds based on clased date  like Q1 FY2014,Q2 FY2014..........Q1 FY2015,Q2 FY2015..

Now i am using this field in x axis but the values are sorted like Q1 FY2014,Q1 FY2015 like this way . but i want Q1 FY2014,Q2 FY2014,Q3FY2014,Q4 FY2014,Q1 FY2015,Q2 FY2015.

Can any one suggest me to come out this .

Thanks,
Sarvesh
HI All,

I want to craete report and dashboard for target values versus actual values. I have created custom object to maintain target values.

Now my goal is to create dashboard(barchart)  for target value versus actual value for every quarterwise.
for this i have tried to create two record type in opportunity and achieve in that way but i don't want to create record type typre for that.

Can any one hlp me out for thi.
Regards,
Sarvesh.
Hi,

I am using Radio Buttons in my vf page .  I have  fields different  with same  picklist values poor, average ,good, excellent.
Now my requirement is  for every field i have to show pick values with radio buttons and when i selected the radio button or evry field and save it. 

Then the respective value means should be save in nthat object.

can any one Help me out for this.\

Regards,
sarvesh.

 
Hi All,
I am getting Session invalid or session expires error when i am caaling one saleforce org from another salesforce org.
here my code for callout.

String content = '{"Name": "Some acoount", "Phone":"9742882954"}';
     HttpRequest req = new HttpRequest();
     req.setEndpoint('https://ap1.salesforce.com/services/apexrest/Accountacc');
     req.setMethod('POST');
     
     String username = 'sarvesh01@gmail.com';
     String password = 'parvati@3';
 
     Blob headerValue = Blob.valueOf(username + ':' + password);
     String authorizationHeader = 'BASIC ' +
     EncodingUtil.base64Encode(headerValue);
     req.SetBody(content);
     req.setHeader('Content-Type', 'application/json; charset=utf-8');
     req.setHeader('Authorization', authorizationHeader);
     req.setHeader('Authorization', 'OAuth '+UserInfo.getSessionId());    
     Http http = new Http();
     HTTPResponse res = http.send(req);
     System.debug(res.getBody());


my rest class in another salesforce org.
@RestResource(urlMapping='/Accountacc/*')  
 global with sharing class callAccount {  
  
  @HttpPost  
   global static String doPost() {  
         
     RestRequest request = RestContext.request;  
     RestResponse response = RestContext.response;  
     String jSONRequestBody=request.requestBody.toString().trim();  
     Account accObj = (Account)JSON.deserializeStrict(jSONRequestBody,Account.class);  
     insert accObj;  
     return accObj.Id;  
   }  
  @HttpGet  
   global static Account doGet() {  
   
     RestRequest request = RestContext.request;  
     RestResponse response = RestContext.response;  
     String accountId = request.requestURI.substring(request.requestURI.lastIndexOf('/')+1);  
     Account acc= [SELECT Id, Name, Phone, Website FROM Account WHERE Id = :accountId];  
     return acc;  
   }  
 }


Can any one help me out please........
Thanks,
sarvesh.
HI

I want two picklist like country and states dependent picklists in vf page .I want to write client side script to chenge the picklist vales based on another pecklist value. I  achieve this byusing apex logic but i want to achive this one by using script on vf page.

Can any one help me please.....
Thanks,
Sarvesh.
 
Hi,
i want to show record in tree view structure for three objects.
Opportunity under this two objects oppLineitem, Invoice objects and under invoice object invoice line item object.

i wnt to show records inthree levels.

Can any one help me out for this.


Thanks,
Sarvesh.

 
Hi, 
I want to get the week number of a month from close date like week-1,week-2,week-3,week-4 in  a formula field.\

can any one help out for this .

Thanks,
Sarvesh

 
Hi,
I want to find the the all sunday in a month based on input month name and  year.

Can anyone help me out for this.


Regards,
Sarevsh

 
Hi,

I want to display record in treeview formate for costom object records in vf page.

 Please help me out for this.

Thanks,
sarvesh.
Hi ,

I want to capture the daily wise plan and actual activity for all users .

Can anyone help me out for this.

Thanks,
sarvesh.



 
HI All,

I want to craete report and dashboard for target values versus actual values. I have created custom object to maintain target values.

Now my goal is to create dashboard(barchart)  for target value versus actual value for every quarterwise.
for this i have tried to create two record type in opportunity and achieve in that way but i don't want to create record type typre for that.

Can any one hlp me out for thi.
Regards,
Sarvesh.
Hi,

I am trying to pass multiple addresses to google map.

Can any one help me out for this.


Regards,
sarevsh.
Hi,
I amcalling vf page on button click through onclickjavascipt  for this i am using below scipt

{!REQUIRESCRIPT("/soap/ajax/20.0/connection.js")} 
    {!REQUIRESCRIPT("/soap/ajax/20.0/apex.js")} 
    var x;
    if (confirm("If Industry Analysis Records Already Exist Press Cancel If Not Press OK") == true) {
        x = "OK";
    } else {
        x = "Cancel";
    }
    if(x == 'OK'){ 
       window.location='/apex/Industry_Analysis?id={!Activities__c.Id}';
    }

My requirement is whether there is related list record is exist or not ,if not call the vf page . if related records exist there shoud show message like record already exist.

can any one help me out for this,
Regards,
Sarvesh.
 


Hi ,
I have tried this one in demo version.
I have posted my code when i clicked the checkbob  corresponding row  is in editable mode .
But the issue is it showing same records repetedly
Can you suggest me...


<apex:page StandardController="Contact" extensions="RowEditingcontroller">

  <apex:pageMessages />

    <apex:form id="theForm">
        <apex:pageBlock Title="ALL CONTACTS FOR ROW EIDTING" id="pb">
         
           <apex:commandButton value="Save" action="{!tosave}" id="saveButton"  />

           <apex:outputPanel >

        

              <apex:pageBlockTable value="{!Contacts}" var="c" cellpadding="2" border="1"  rowClasses="odd,even" styleClass="tableClass" id="opp_table">
                
                  <apex:column headerValue="Edit" >
                     <apex:inputcheckbox value="{!c.selected}">
                       <apex:actionSupport event="onclick" action="{!getSelected}"  rerender="pb" />
                     </apex:inputcheckbox>&nbsp;
                  </apex:column>
                   <apex:column headerValue="Contact name" >
                 
                    <b><apex:outputField rendered="{!IF(c.selected==true,false,true)}" value="{!c.con.Name}"/> </b>  
                       <apex:inputfield rendered="{!IF(c.selected==true,true,false)}" value="{!c.con.Name}"/>
                      </apex:column>
                 <apex:column headerValue="Contact No" >
                    <apex:outputfield rendered="{!IF(c.selected==true,false,true)}" value="{!c.con.MobilePhone}" />
                   <apex:inputfield rendered="{!IF(c.selected==true,true,false)}" value="{!c.con.MobilePhone}" />
                 </apex:column>
                 <apex:column headerValue="Email">
                   <apex:outputField rendered="{!IF(c.selected==true,false,true)}" value="{!c.con.Email}"/>
                    <apex:inputField rendered="{!IF(c.selected==true,true,false)}" value="{!c.con.Email}"/>
                 </apex:column>
               <apex:inlineEditSupport event="ondblClick"  showOnEdit="saveButton"/>
              

         </apex:pageBlockTable>

      </apex:outputPanel>

     </apex:pageBlock>
  </apex:form>

  </apex:page>


---------------------------------------------controller------------------------------------
public class RowEditingcontroller {

     //All property....

     public Contact contact{get;set;}
     public Id Id{get;set;}
     List<contactwrapper> contactList = new List<contactwrapper>();
     List<Contact> selectedContacts = new List<Contact>();

     //constructor....

     public RowEditingcontroller(ApexPages.StandardController controller) {
  
      

      }

     //displaying contact pageBlock table....
    
     public  List<contactwrapper> getContacts() {
  
        for(Contact c: [select Id,Name,Account.Name,MobilePhone,Email from Contact order by createdDate desc limit 1  ])
   
              contactList.add(new contactwrapper(c));
              return contactList;
          }

       //all selected contacts...for edit...     
     public PageReference getSelected() {
  
         selectedContacts.clear();
         for(contactwrapper conwrapper: contactList)
            if(conwrapper.selected == true)
     
            selectedContacts.add(conwrapper.con);
     
            return null;
        }
      
      
     public List<Contact> GetSelectedContacts(){
  
        if(selectedContacts.size()>0)
        return selectedContacts;
        else
       // ApexPages.addMessage(new ApexPages.message(ApexPages.severity.ERROR,'Please select at least one Contact.'));
        return null;
    }
   
    //saving edited value...
 
      public PageReference tosave() {
      if(selectedContacts.size()>0){
    
        update selectedContacts;
        PageReference RowEditing=new PageReference('/apex/RowEditing');
        RowEditing.setRedirect(true);
        return RowEditing;
        }
        else{
        ApexPages.addMessage(new ApexPages.message(ApexPages.severity.ERROR,'Please select at least one Contact.'));
         return null;
        }
     
       }
  
    //wrapper class...
  
    public class contactwrapper
    {
        public Contact con{get; set;}
        public Boolean selected {get; set;}
        public contactwrapper(Contact c)
        {
            con = c;
            selected = false;
        }
    }
}

Hey Everyone,

 

We are trying to deactivate customer portal email notification settings but we are unable to do it. We don't find anything in the documents. May be we are missing something. Can anybosy please help us to knwo how to deactivate customer poratl email notification to the new user.

 

 

Thanks,

Kanupriya

  • July 19, 2012
  • Like
  • 0

I am trying to submit my sitemap to Google webmaster tools, and am having some issues with the robots.txt functionality.

 

 

I created a VF page called robots with this as the source:

 

 

<apex:page contentType="text/plain">
User-agent: *
Disallow:
Sitemap: www.innovationaero.com/sitemap
</apex:page>

 

Then I linked it to the site using the robots.txt field.

 

My site info is:

 

Default web address: innovationaero.force.com

Custom web address: www.innovationaero.com

 

 

Now, here comes the problem. These 2 files are different:

www.innovationaero.com/robots.txt (disallows everything)

www.innovationaero.com/robots (allows everything)

 

 

How do I change the default robots.txt file so that google will see my site?

 

Thanks!
Emily

 

hello, i' m new to salesforce and i really have no idea how to make a map to show all my client account on it, i will need it to be able to see witch client  are close to the one i' m going to visit. I' ll be really glad if someone can be so nice to help me out with it.

thanks for reading this message
Message Edited by ninfh on 03-24-2010 01:31 PM
Message Edited by ninfh on 03-24-2010 01:34 PM
  • March 24, 2010
  • Like
  • 0