• kab
  • NEWBIE
  • 25 Points
  • Member since 2010

  • Chatter
    Feed
  • 1
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 26
    Questions
  • 25
    Replies

Hi ,

I have a multiple accounts informations and for each acocount I wanted to have specific page numbering.

Suppose Account1 has 2 pages then it should say in footer Account1 Page 1 of 2 and Account1 Page 2of 2 in second page.

I could able to separate the account spanning into multiple pages but not sure how to display in the footer with account name and page no.

 

Any healp or sample code appriciated.

 

thanks

Kab

 

 

  • April 16, 2012
  • Like
  • 0

I wanted to edit the record and viewable by the record owner and admin and also based on recordtypes.

Also I want to share a particular record type to everyone from contact and restrict another record types to others.

 

Can I acheive this without creating sharing rules?

If so how?

 

Please let me know steps.

 

thanks

K

  • December 24, 2011
  • Like
  • 0

I have a visual force page VF1

Code looks loke following

<apex:page standardController="Opportunity" id="thePage" extensions="Controller1">  

<apex:form id="theForm">
        <h2><a href="../{!Opportunity.Id}">goto Opportunity : {!Opportunity.Name}</a></h2>
        <br></br><br></br>
        <apex:Commandbutton action="{!sendPdf}"  value="sendPdf"/>
   
   </apex:form>    

 

</apex:page>

 

When I remove "<h2><a href="../{!Opportunity.Id}">goto Opportunity : {!Opportunity.Name}</a></h2>" line the pdf attachment comes fine in the email({!Opportunity.Name} and {!Opportunity.ID} is causing that problem. Any workaround for this.Anyone experienced this issue?

Pl. help.

 

Controller has the following method

 

public PageReference sendPdf() {

 

PageReference pdf = Page.VF_PDF;

// add parent id to the parameters for standardcontroller

pdf.getParameters().put('id',opp.Id);

 

// the contents of the attachment from the pdf

Blob body;

try{

 

// returns the output of the page as a PDF

body = pdf.getContent();

// need to pass unit test -- current bug

}

catch(VisualforceException e) {

System.debug(

'***Exception:'+e);

body = Blob.valueOf(

'Error in Fax pdf');

}

 

Messaging.EmailFileAttachment attach =

newMessaging.EmailFileAttachment();

attach.setContentType('application/pdf');

attach.setFileName('Test.pdf');

attach.setInline(false);

attach.Body = body;

String emailId=opp.email__c;

Messaging.SingleEmailMessage mail =newMessaging.SingleEmailMessage();

mail.setUseSignature(false);

mail.setToAddresses(newString[] { emailId });

mail.setSubject('test');

mail.setHtmlBody('testbody');

mail.setFileAttachments(newMessaging.EmailFileAttachment[] { attach });

 

// Send the email

Messaging.sendEmail(newMessaging.SingleEmailMessage[] { mail });

 

}

returnnull;

 

}



  • December 16, 2011
  • Like
  • 0

It is a wizard and each page is rendered as pdf. When I submit the page it should generate all 3 pages data and generate a single  pdf and send to email.

 

Is there anyone who has done simillar requirements.

 

I can't keep th page in the memory and onlty lastpage is rendered and snd by email.

 

any help or code should be helpful.

 

thanks

 

 

 

  • December 07, 2011
  • Like
  • 0

Is there a way I can send email to specific Account EmailID(Emailid is a custom field in the account) using templates?

Also I need to send email using Opportunity data that is in the template.

Mycode looks like this.

 

Messaging.SingleEmailMessage mail =

newMessaging.SingleEmailMessage();

List<String> tolist=newList<String>();

tolist.add('test@test.com');

mail.setCcAddresses(tolist);

mail.setToAddresses(tolist);

 

mail.setTargetObjectId(objOpp.AccountID);

// Specify who the email should be sent to. //mail.setWhatId(objOpp.tower__c);

mail.setTemplateId('00XC0000001SKoE');

 

Messaging.sendEmail(

newMessaging.SingleEmailMessage[] {mail});

 

I get error only Lead,User and Contact can be used to set the teargetid.

 

Thanks in advance for your help.

  • December 07, 2011
  • Like
  • 0

Is there a way I can check in the validationrule/trigger to fire only at the time of lead conversion?

I don't want that to fire upon save.

 

thanks

K

  • November 01, 2011
  • Like
  • 0

How to hide History of a specific opportunity record? Is there a way to do this?

 

thanks

  • October 03, 2011
  • Like
  • 0

I want to use the function to round it to next number. for example 2.1 should be 3 and 2.4 should be 3 also 2.7 should be 3

  • September 22, 2011
  • Like
  • 0

I don't want to give them sys Admin profile or modify all data priviledge. Is there any other way the specific group of users can edit records routed for approval (locked reord).

 

 Please take example of a Quote which is under process of approval and email sent to the approver and the user wanted to edit and does not have Sys Admin profile.

 

Can I use sharing rules or something?

 

thanks

 

 

  • August 10, 2011
  • Like
  • 0

I am not sure if I can acheive the following thro' a Formulae field.

 

I have a date field Case object  "Opened Date" and I have different Status(Open,Closed,Pending,Escalated etc..) of case.

 

I want to display the value of the formulae field how long it was open(Today-OpenDate)

When I change the status from Open to something else I wanted to stop the calculation of no. of days and display only those days it was open. If I change to Pending it should reset the value to 0.

 

Is this possible thro' a formulae field  if so Can you please add some formulae in this post?

 

Thanks in advance.

 

  • May 17, 2011
  • Like
  • 0

Hi,

I am having trouble in code deployment to prod.

When I deploy to prod 4 classes are giving exception that id not found.

When I fix the error and try to deploy the code then get the error that  code coverage is less than 75%.

 

I tried to deploy a different class which has less coverage and getting exception of those other previous classes.

 

Then I tried to deploy the class with more coverage and those classes I fixed error together and getting the same error less than 75%.

 

I am not sure what to do now.

I tried individual classes and getting exception and tried together all classes and getting less coverage although I increased the coverage and everything is failing.

 

 

 

  • May 09, 2011
  • Like
  • 0

I am wondering is there a way I can hide a specific value in a visualforce page using either controller or in Visualforce page.

 

Suppose I have original Picklist Values in setup :

A- 123

B-234

C-345

 

I want to Display only 2 values on a Visual force page.Like

 B-234

C-345

How can I acheive this?

 

Please put some code if it is possible.

  • May 03, 2011
  • Like
  • 0

I have a list Button on a Salesforce Outof Box page. Using that List button I open a visualforce page. I want to hide that button to some users/profiles. I don't see any way to do that.

Can you please let me know if there is a way to hide for a profile.

 

To reproduce this. you can Create a List Button on Opportunity Buttons & Links

2. Assign that button in  Opportunity Search Layouts/Opportunities List View

 

go to Opportunity Tab and Claik Go  and you should see the button next to "Go" Button.

 

thanks

in advance.

  • April 28, 2011
  • Like
  • 0

I am in bay area and right now I am working on a part time job so looking for some Apex/Visualforcedevelopment/Integration or data migration work.

Let me know if you are looking for any.

 

thanks

Sri

  • April 15, 2011
  • Like
  • 0

 

I am trying to add on header checkbox, where I can select All  the row check boxes by clicking on the header

Using the following code.

<apex:column > 

<apex:facet name="header1"><apex:outputLabel value="Select All" for="select_All_Check"/></apex:facet>

<apex:facet name="header2"><apex:inputCheckbox  id="select_All_Check"></apex:inputCheckbox></apex:facet> <apex:inputField id="Selectd_Row" value="{!con.Field__c}" /> 

</apex:column>

It is not displaying both checkbox and text.  is there anything wrong in my code?

 

Thank you.

  • April 15, 2011
  • Like
  • 0

This is not inside visualforce controller it is a independent class

ApexPages.Message myMsg =

new ApexPages.Message(ApexPages.Severity.ERROR, message Text);

ApexPages.addMessage(myMsg);

return null;

 

How can I add code coverage for the following apex.code?

 

  • April 14, 2011
  • Like
  • 0

Hi,

 I am trying to get the value of 3 fields and get the latest record by the contact id getting error, when I try to get the value of other field(Id) that is not in groupby clause

sobject[] res= [Select id,Contact__c,max(createddate) from Custom_Object__c group by Contact__c];

This is general syntax also in other sql. Dow to get the ID of the record which is the latest.

 

Is there any soql I can use which would give me the result with(ID, Contact__c)?

Contact__c could have multiple records.

 

 


.

 

 

  • April 12, 2011
  • Like
  • 0

I am using the following line the auto scroll bar to appear

<apex:outputPanel layout="block" style="overflow:auto;width:1050px;height:350px" >

<apex:pageBlockTable value="{!List_Opps}" var="opp" id="list" rules="all" >

<apex:column headerValue="Stage">
<apex:inputField value="{!opp.stageName}"/>
</apex:column>

StageName is a Dropdownlist coming from Opportunity. Is there anything I am missing for IE8?

 

it works fine on other IE versions and firefox.

 

Another issue with the above code the headers are moving up when using scroll bar can I freeze the header with any parameter.(This happens for all browsers)?

 

  • March 30, 2011
  • Like
  • 0

I have created an email template where I wanted to have  values from 3 different objects(Contact, Opportunity, Custom_Obj__c)

 

Is there anyway  I can dynamially change the values of the template?

 

Any sample code would be appriciated.

 

thanks in advance.

  • March 24, 2011
  • Like
  • 0

Hi ,

I have a multiple accounts informations and for each acocount I wanted to have specific page numbering.

Suppose Account1 has 2 pages then it should say in footer Account1 Page 1 of 2 and Account1 Page 2of 2 in second page.

I could able to separate the account spanning into multiple pages but not sure how to display in the footer with account name and page no.

 

Any healp or sample code appriciated.

 

thanks

Kab

 

 

  • April 16, 2012
  • Like
  • 0

I have a visual force page VF1

Code looks loke following

<apex:page standardController="Opportunity" id="thePage" extensions="Controller1">  

<apex:form id="theForm">
        <h2><a href="../{!Opportunity.Id}">goto Opportunity : {!Opportunity.Name}</a></h2>
        <br></br><br></br>
        <apex:Commandbutton action="{!sendPdf}"  value="sendPdf"/>
   
   </apex:form>    

 

</apex:page>

 

When I remove "<h2><a href="../{!Opportunity.Id}">goto Opportunity : {!Opportunity.Name}</a></h2>" line the pdf attachment comes fine in the email({!Opportunity.Name} and {!Opportunity.ID} is causing that problem. Any workaround for this.Anyone experienced this issue?

Pl. help.

 

Controller has the following method

 

public PageReference sendPdf() {

 

PageReference pdf = Page.VF_PDF;

// add parent id to the parameters for standardcontroller

pdf.getParameters().put('id',opp.Id);

 

// the contents of the attachment from the pdf

Blob body;

try{

 

// returns the output of the page as a PDF

body = pdf.getContent();

// need to pass unit test -- current bug

}

catch(VisualforceException e) {

System.debug(

'***Exception:'+e);

body = Blob.valueOf(

'Error in Fax pdf');

}

 

Messaging.EmailFileAttachment attach =

newMessaging.EmailFileAttachment();

attach.setContentType('application/pdf');

attach.setFileName('Test.pdf');

attach.setInline(false);

attach.Body = body;

String emailId=opp.email__c;

Messaging.SingleEmailMessage mail =newMessaging.SingleEmailMessage();

mail.setUseSignature(false);

mail.setToAddresses(newString[] { emailId });

mail.setSubject('test');

mail.setHtmlBody('testbody');

mail.setFileAttachments(newMessaging.EmailFileAttachment[] { attach });

 

// Send the email

Messaging.sendEmail(newMessaging.SingleEmailMessage[] { mail });

 

}

returnnull;

 

}



  • December 16, 2011
  • Like
  • 0

Is there a way I can check in the validationrule/trigger to fire only at the time of lead conversion?

I don't want that to fire upon save.

 

thanks

K

  • November 01, 2011
  • Like
  • 0

I want to use the function to round it to next number. for example 2.1 should be 3 and 2.4 should be 3 also 2.7 should be 3

  • September 22, 2011
  • Like
  • 0

I don't want to give them sys Admin profile or modify all data priviledge. Is there any other way the specific group of users can edit records routed for approval (locked reord).

 

 Please take example of a Quote which is under process of approval and email sent to the approver and the user wanted to edit and does not have Sys Admin profile.

 

Can I use sharing rules or something?

 

thanks

 

 

  • August 10, 2011
  • Like
  • 0

I am not sure if I can acheive the following thro' a Formulae field.

 

I have a date field Case object  "Opened Date" and I have different Status(Open,Closed,Pending,Escalated etc..) of case.

 

I want to display the value of the formulae field how long it was open(Today-OpenDate)

When I change the status from Open to something else I wanted to stop the calculation of no. of days and display only those days it was open. If I change to Pending it should reset the value to 0.

 

Is this possible thro' a formulae field  if so Can you please add some formulae in this post?

 

Thanks in advance.

 

  • May 17, 2011
  • Like
  • 0

Hi,

I am having trouble in code deployment to prod.

When I deploy to prod 4 classes are giving exception that id not found.

When I fix the error and try to deploy the code then get the error that  code coverage is less than 75%.

 

I tried to deploy a different class which has less coverage and getting exception of those other previous classes.

 

Then I tried to deploy the class with more coverage and those classes I fixed error together and getting the same error less than 75%.

 

I am not sure what to do now.

I tried individual classes and getting exception and tried together all classes and getting less coverage although I increased the coverage and everything is failing.

 

 

 

  • May 09, 2011
  • Like
  • 0

I am wondering is there a way I can hide a specific value in a visualforce page using either controller or in Visualforce page.

 

Suppose I have original Picklist Values in setup :

A- 123

B-234

C-345

 

I want to Display only 2 values on a Visual force page.Like

 B-234

C-345

How can I acheive this?

 

Please put some code if it is possible.

  • May 03, 2011
  • Like
  • 0

I have a list Button on a Salesforce Outof Box page. Using that List button I open a visualforce page. I want to hide that button to some users/profiles. I don't see any way to do that.

Can you please let me know if there is a way to hide for a profile.

 

To reproduce this. you can Create a List Button on Opportunity Buttons & Links

2. Assign that button in  Opportunity Search Layouts/Opportunities List View

 

go to Opportunity Tab and Claik Go  and you should see the button next to "Go" Button.

 

thanks

in advance.

  • April 28, 2011
  • Like
  • 0

 

I am trying to add on header checkbox, where I can select All  the row check boxes by clicking on the header

Using the following code.

<apex:column > 

<apex:facet name="header1"><apex:outputLabel value="Select All" for="select_All_Check"/></apex:facet>

<apex:facet name="header2"><apex:inputCheckbox  id="select_All_Check"></apex:inputCheckbox></apex:facet> <apex:inputField id="Selectd_Row" value="{!con.Field__c}" /> 

</apex:column>

It is not displaying both checkbox and text.  is there anything wrong in my code?

 

Thank you.

  • April 15, 2011
  • Like
  • 0

Reid & Associates, LLC is looking to hire exceptional employees or consultants into following positions:

 

 

To learn more about Reid & Associates, LLC, please visit: http://www.thinkreid.com/home/careers

 

NOTE: All Applicants must be legally authorized to work in the United States without sponsorship.

Hi,

 I am trying to get the value of 3 fields and get the latest record by the contact id getting error, when I try to get the value of other field(Id) that is not in groupby clause

sobject[] res= [Select id,Contact__c,max(createddate) from Custom_Object__c group by Contact__c];

This is general syntax also in other sql. Dow to get the ID of the record which is the latest.

 

Is there any soql I can use which would give me the result with(ID, Contact__c)?

Contact__c could have multiple records.

 

 


.

 

 

  • April 12, 2011
  • Like
  • 0

I am using the following line the auto scroll bar to appear

<apex:outputPanel layout="block" style="overflow:auto;width:1050px;height:350px" >

<apex:pageBlockTable value="{!List_Opps}" var="opp" id="list" rules="all" >

<apex:column headerValue="Stage">
<apex:inputField value="{!opp.stageName}"/>
</apex:column>

StageName is a Dropdownlist coming from Opportunity. Is there anything I am missing for IE8?

 

it works fine on other IE versions and firefox.

 

Another issue with the above code the headers are moving up when using scroll bar can I freeze the header with any parameter.(This happens for all browsers)?

 

  • March 30, 2011
  • Like
  • 0

need salesforce support in california timings

I have created an email template where I wanted to have  values from 3 different objects(Contact, Opportunity, Custom_Obj__c)

 

Is there anyway  I can dynamially change the values of the template?

 

Any sample code would be appriciated.

 

thanks in advance.

  • March 24, 2011
  • Like
  • 0

I am using Apex page Controller methods  to read the attachments and send using email attachments. When I reach above 3MB it is converting html file. Is there any issue or limitation on email attachments?

Suppose my file name is testfile.pdf then it converts to testfile.pdf.html.

if the file size less than 3mb it sends testfile.pdf

Document says it supports 10MB. if the size is morethann 10mb then I get error message Limit exceeded.

My code looks like below:

Messaging.Singleemailmessage    single_mail = new Messaging.Singleemailmessage();              
              

Messaging.EmailFileAttachment[] fileAttachments = new Messaging.EmailFileAttachment[ShowFiles.size()];
                for(integer cnt=0;cnt< fileAttachments.size(); cnt++)
                {
                  
                    Messaging.EmailFileAttachment fileAttachment = new Messaging.EmailFileAttachment();
                    fileAttachment.setBody(emailBodyBlob);
                    fileAttachment.setFileName(FileName);
                    fileAttachments[cnt] = fileAttachment;
                   
                } 
                single_mail.setFileAttachments(fileAttachments);
             }
           
            // Specify the text content of the email.
            single_mail.setPlainTextBody(body);
                       
            // Send the email you have created.
            Messaging.SendEmailResult[] result = Messaging.sendEmail(new Messaging.SingleEmailMessage[] { single_mail });
           
How can I send actual files upto10mb without converting to html.

  • March 19, 2011
  • Like
  • 0

How can I read a URL value from a List button and it is  on on the standardview page not a custom VF page.
I am using this button as List Type and content source=URL and in the value= .../apex/opppty

 

can I pass the current URL to the button click  (like:.../apex/opppty?returl=https://cs4.salesforce.com/006?fcf=00BP0000000TbV4)

 

I just need to keep URL of  the original SF standard page  after loading my custom Visualforce page and when user wanted to go back to the page they can navigate there easily.

  • March 14, 2011
  • Like
  • 0

Outstanding opportunity for highly experienced sfdc registered consultants and developers with 5+ years experience. Opportunity to earn $100K plus working part time.  Remote work is OK but must be US based. Excellent communication and analytic skills required. Verifiable and impeccable references an absolute must. No companies or recruiters. Send your resume to hr<at>customerforlife.com Thank you.