• Bodhtree1
  • NEWBIE
  • 5 Points
  • Member since 2010

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 15
    Questions
  • 7
    Replies

Hi All,

 

I have a requirement to freeze the pageblocksection between different logouts and logins of a User.

 

Suppose the user collapsed the pageblocksection and logs out,when he again logs in he should see the pageblocksection as collapsible only.

 

 

Please let me know if this is possible. Expecting a fast Response.

 

Thanks All,

Vamsi Krishna

<img src="http://chart.apis.google.com/chart?cht=bvg&chco=0A8C8A|0A8C8A|0A8C8A|0A8C8A|0A8C8A|0A8C8A|0A8C8A|0A8C8A&chs=300x225&cht=bvg&chxt=x,x,y,y&chxl=0:|{!Projections_Whs__c.whs_Year__c}|{!Projections_Whs__c.Year1__c}|{!Projections_Whs__c.Year2__c}|{!Projections_Whs__c.Year3__c}|{!Projections_Whs__c.Year4__c}|{!Projections_Whs__c.Year5__c}|{!Projections_Whs__c.Year6__c}|{!Projections_Whs__c.Year7__c}|
|3:|Currency|1:|Year|&chxp=3,50|1,50&chbh=50,0,35&chxr=2,{!Projections_Whs__c.opermin__c},{!Projections_Whs__c.operm__c}&chds={!Projections_Whs__c.opermin__c},{!Projections_Whs__c.operm__c}&chco=A2C180,3D7930&chbh=a,5,15&chd=t:{!Projections_Whs__c.oper1__c},{!Projections_Whs__c.oper2__c},{!Projections_Whs__c.oper3__c},{!Projections_Whs__c.oper4__c},{!Projections_Whs__c.oper5__c},{!Projections_Whs__c.oper6__c},{!Projections_Whs__c.oper7__c},{!Projections_Whs__c.oper8__c}&chtt=Operating Profit Value Graph"/>

 

 

 

Out put would be like this

 

 

 

 

Hi,

 

I have the Following Information.For all the codes I am using one picklist to hold all the values and another picklist called Description to hold the all Description values. If a user selects a Description ,Then in the back end it should be saved with the corresponding mapping value. Is this possible through Translation WorkBench. This functionality is done using Formula fields and Triggers.Can anybody help me to get me this Functionality using Translation workbench.

 

CodeDescription
  
0001Land And Buildings
0002Vehicles
0003Machinery and Equipment
0004Live Stock
0005Others if Any
0006Others if Any  - 1
0007

Others if Any  - 2

Hi,

 

I have the Following Information.For all the codes I am using one picklist to hold all the values and another picklist called Description to hold the all Description values. If a user selects a Description ,Then in the back end it should be saved with the corresponding mapping value. Is this possible through Translation WorkBench. This functionality is done using Formula fields and Triggers.Can anybody help me to get me this Functionality using Translation workbench.

 

CodeDescription
  
0001Land And Buildings
0002Vehicles
0003Machinery and Equipment
0004Live Stock
0005Others if Any
0006Others if Any  - 1
0007

Others if Any  - 2

Hi Folks,

 

I need some Help How to integrate salesforce with facebook. I am looking around to many problems during Integration Process.Solution Providers are Highly Appreciated.

 

The URL I visited to do this Task :

 

http://wiki.developerforce.com/index.php/Installing_Force_for_Facebook

 

Thanking you in Advance,

Vamsi Krishna

Hi,

 

I am generating a pdf and capturing content dynamically from more than one custom object and sending that pdf as a mail.I added Header and footer on the first page.If the length of the content exceeds the page,the footer on the page is going to the next page,and the header is also not appearing on it.Can u providing me a solution to solve this,,

 

Thanking u in Advance,

Vamsi Krishna

Hi EveryOne,

 

I displayed a single kind of image for all the activities in a particular month.When i Hovers to that image it should display the details of that particular activity(Note:But statically a single image is used for all the activities based on the activities count in that particular month.But when i hovers to the each image seperately,it should display only that appropriate activity details.

 

Thanking you,

Vamsi Krishna.

I had wriiten the query like this to get the events in a particular month like this,but this is producing error.

 

List<Event> activities=new List<Event>;

activities=[select ActivityDate from Event where ActivityDate.month()=5];

 

 

The error produced is :Error: Compile Error: unexpected token: ')'

How to write a SOQL Query which gets all the Activities in a particular month?

public class DisplayActivities{

    public DisplayActivities() {

    }


    public DisplayActivities(ApexPages.StandardController controller) {

    }
List<Task> activities;
List<Event> activities1;
List<Date> janlist;
List<Date> feblist;
List<Date> marlist;
List<Date> aprlist;
List<Date> maylist;
List<Date> junlist=new List<Date>();
List<Date> jullist=new List<Date>();
List<Date> junlist1=new List<Date>();
List<Date> jullist1=new List<Date>();
public Date activity{get;set;}
public Integer a{get;set;}
public List<Event> getActivities1()
{
activities1=[select ActivityDate FROM Event];
for(Event t1:activities1)
{
if(t1.ActivityDate!=NULL)
a=t1.ActivityDate.month();
if(a==1)
{
janlist.add(t1.ActivityDate);
}
else if(a==2)
        {
        feblist.add(t1.ActivityDate);
        }
else if(a==3)
        {
        marlist.add(t1.ActivityDate);
       }
else if(a==4)
       {
       aprlist.add(t1.ActivityDate);
       }
else if(a==5)
       {
       maylist.add(t1.ActivityDate);
       }
else if(a==6)
       {
       junlist1.add(t1.ActivityDate);
       System.debug('____'+junlist);
       }
else{
       jullist1.add(t1.ActivityDate);
       System.debug('____'+jullist);
       }
}
return activities1;
}
public list<Task> getActivities() {
        activities=[select ActivityDate FROM Task];
        //activity=activities[0].ActivityDate;   
        //a=activity.month();
        for(Task t:activities)
        {
        if(t.ActivityDate!=NULL)
        a=t.ActivityDate.month();
        if(a==1)
        {
        janlist.add(t.ActivityDate);
       }
       else if(a==2)
        {
        feblist.add(t.ActivityDate);
        }
       else if(a==3)
        {
        marlist.add(t.ActivityDate);
       }
       else if(a==4)
       {
       aprlist.add(t.ActivityDate);
       }
       else if(a==5)
       {
       maylist.add(t.ActivityDate);
       }
       else if(a==6)
       {
       junlist.add(t.ActivityDate);
       System.debug('____'+junlist);
       }
       else{
       jullist.add(t.ActivityDate);
       System.debug('____'+jullist);
       }
       }
        return activities;
         }
public List<Date> getJunlist()
{    
return junlist;    
}
public List<Date> getJullist()
{    
return jullist;    
}
public List<Date> getJunlist1()
{
return junlist1;
}
}

 


How to use the Date Values that was inserted into the List<Date> junlist  by using junlist in the visual force page and display them on the console?

System.EmailException: SendEmail failed. First exception on row 0; first error: REQUIRED_FIELD_MISSING, Missing body, need at least one of html or plainText:

visual force page:


<apex:page standardController="Quotation__c" extensions="sendEmail1" sidebar="false">
<apex:sectionHeader title="Quotation Information Form" printUrl="https://cs5.salesforce.com/apex/QuotePdf?id={!$CurrentPage.parameters.id}&sfdc.override=1"/>
    <apex:form >
        <apex:pageBlock >
            <apex:pageBlockSection title="Quotation Details" columns="1">  
                                     
                 <apex:outputField value="{!Quotation__c.Name}"/>
                <apex:outputField value="{!Quotation__c.To__c}"/>
               
               <apex:outputField value="{!Quotation__c.Address__c}"/>
               <apex:OutputField value="{!Quotation__c.Kind_Attn__c}"/>
               <apex:OutputField value="{!Quotation__c.Dear_Sir__c}"/>
               <apex:OutputField value="{!Quotation__c.Notes__c}"/>
               <apex:OutputField value="{!Quotation__c.Terms_and_Conditions__c}"/>
               <apex:OutputField value="{!Quotation__c.Items_Selected__c}"/>
                
                
            
            
               <!-- <apex:outputField value="{!Quotation__c.Items_Selected__r.Name}"/>
                <apex:outputField value="{!Quotation__c.}"/> -->
                
            </apex:pageBlockSection>
        </apex:pageBlock>

       
<apex:dataTable value="{!itemSelected}" var="fcst" width="100%" >
<apex:column width="8%" ><apex:facet name="header">Product</apex:facet><apex:outputLabel value="{!fcst.Product__r.name}" /></apex:column>
<apex:column width="8%"><apex:facet name="header">Item Description</apex:facet><apex:outputLabel value="{!fcst.Item_Description__c}" /></apex:column>
<apex:column width="8%"><apex:facet name="header">Unit Price</apex:facet><apex:outputLabel value="{!fcst.Unit_Price__c}" /></apex:column>
<apex:column width="8%"><apex:facet name="header">Quantity</apex:facet><apex:outputLabel value="{!fcst.Quantity__c}" /></apex:column>
<apex:column width="8%"><apex:facet name="header">Total Price</apex:facet><apex:outputLabel value="{!fcst.Total_Price__c}" /></apex:column>


</apex:dataTable>
<apex:commandButton value="send" action="{!send}"/>
       
    </apex:form>        
</apex:page>



Apex Controller:

 

public class sendEmail1
{
public Quotation__c quot;
public sendEmail1(ApexPages.StandardController controller)
 {
 }
 public sendEmail1()
 {
 quot=[select Id,To__r.Email from Quotation__c where id=:ApexPages.currentPage().getParameters().get('id')];
 }

public List<Items_Selected__c> getitemSelected ()
{
List<Items_Selected__c> ISRL =[select Product__r.name,Quantity__c,Item_Description__c,Unit_Price__c,Total_Price__c from Items_Selected__c where Quotation__c =: ApexPages.currentPage().getParameters().get('id')];
return ISRL;
}

public PageReference send()
{
        Messaging.SingleEmailMessage email = new Messaging.SingleEmailMessage();
        PageReference pdf = Page.QuotePdf;
        pdf.getParameters().put('id',(String)quot.Id);
        pdf.setRedirect(true);
        Blob b = pdf.getContent();
        Messaging.EmailFileAttachment efa=new Messaging.EmailFileAttachment();
        efa.setFileName('attachment.pdf');
        efa.setBody(b);
        String address=quot.To__r.Email;
        email.setToAddresses(new String[]{address});
        email.setFileAttachments(new Messaging.EmailFileAttachment[]{efa});
        Messaging.sendEmailResult[] r=Messaging.sendEmail(new Messaging.SingleEmailMessage[]{email});
        return null;
        
        }
        }

 


When the save Button is clicked,it is producing a Error as :ATTEMPT TO DEREFERENCE A NULL OBJECT.

 

Can i know where the problem had occured..

There is a Custom Object named Quotation.There is a look up field in  a Quotataion which is related to Items..

 

My Requirement is :I need to add multiple items in the Quotation.I created a Button field next to the lookup field in the Quotation which relates to Item.When that Button is Clicked A new look up field should be created automatically

 

 

My Code:

<apex:page standardController="Quotation__c">
<script language="javascript">
function fun()
{
<!-- var btnCopy = document.getElementById("{!$Component.btncopy}"); -->
document.getElementById(btncopy).appendChild('<apex:form><apex:inputfield value="{!Quotation__c.Item__c}"/></apex:form>') ;
}
</script>
<apex:form>
<apex:inputField id="btncopy" value="{!Quotation__c.Item__c}"/>
<apex:commandButton  value="Add" onclick="fun()"/>
</apex:form>
</apex:page>

 

But In this code when the Button is Clicked no action is taking place..Please Provide a Solution

I am Overding a Custom Object  with a Visual Force Page. In that Page I created a Button After a Look up Field.Suppose If i clicked that button,it should create a new look up field of that type.Is This Possible?

For Example:::

 

Can we display all the activities(events,tasks) in a graphical manner..Like which activity should be completed in which month.All the completed activities with one symbol...

Facebook has created a pretty slick javascript API that allows you to add Like buttons, Login buttons, and more. Yet there is one major problem with the force.com platform. This requires you to use custom facebook tags such as:

 

<fb:like href="http://developers.facebook.com/" width="450" height="80"/>

But when you try to save the page the Visualforce compilers interprets "<fb:" as the markup for a Visualforce component and throws an error:

 

Error: Unknown component fb:like

 

This makes it a pain to integrate force.com sites with facebook. This is actually a Visualforce issue but the really loser here is force.com sites and this is why I posted in the sites section.

 

Thanks,

Jason

  • August 08, 2010
  • Like
  • 0

System.EmailException: SendEmail failed. First exception on row 0; first error: REQUIRED_FIELD_MISSING, Missing body, need at least one of html or plainText:

There is a Custom Object named Quotation.There is a look up field in  a Quotataion which is related to Items..

 

My Requirement is :I need to add multiple items in the Quotation.I created a Button field next to the lookup field in the Quotation which relates to Item.When that Button is Clicked A new look up field should be created automatically

 

 

My Code:

<apex:page standardController="Quotation__c">
<script language="javascript">
function fun()
{
<!-- var btnCopy = document.getElementById("{!$Component.btncopy}"); -->
document.getElementById(btncopy).appendChild('<apex:form><apex:inputfield value="{!Quotation__c.Item__c}"/></apex:form>') ;
}
</script>
<apex:form>
<apex:inputField id="btncopy" value="{!Quotation__c.Item__c}"/>
<apex:commandButton  value="Add" onclick="fun()"/>
</apex:form>
</apex:page>

 

But In this code when the Button is Clicked no action is taking place..Please Provide a Solution

i was tring to do the force.com for google app tutorial (http://wiki.developerforce.com/index.php/Force.com_for_Google_App_Engine_User_Guide_Java). With the hello world app i don't have problem but when i try to generate a new record i have this error:

 

 

HTTP ERROR 404
Problem accessing /provaent. Reason:
    Servlet class provaent.ProvaentServlet is not a javax.servlet.Servlet
Caused by:
javax.servlet.UnavailableException: Servlet class provaent.ProvaentServlet is not a javax.servlet.Servlet
at org.mortbay.jetty.servlet.ServletHolder.checkServletType(ServletHolder.java:362)
at org.mortbay.jetty.servlet.ServletHolder.doStart(ServletHolder.java:243)
at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:50)
at org.mortbay.jetty.servlet.ServletHandler.initialize(ServletHandler.java:685)
at org.mortbay.jetty.servlet.Context.startContext(Context.java:140)
at org.mortbay.jetty.webapp.WebAppContext.startContext(WebAppContext.java:1250)
at org.mortbay.jetty.handler.ContextHandler.doStart(ContextHandler.java:517)
at org.mortbay.jetty.webapp.WebAppContext.doStart(WebAppContext.java:467)
at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:50)
at org.mortbay.jetty.handler.HandlerWrapper.doStart(HandlerWrapper.java:130)
at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:50)
at org.mortbay.jetty.handler.HandlerWrapper.doStart(HandlerWrapper.java:130)
at org.mortbay.jetty.Server.doStart(Server.java:224)
at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:50)
at com.google.appengine.tools.development.JettyContainerService.startContainer(JettyContainerService.java:185)
at com.google.appengine.tools.development.AbstractContainerService.startup(AbstractContainerService.java:147)
at com.google.appengine.tools.development.DevAppServerImpl.start(DevAppServerImpl.java:219)
at com.google.appengine.tools.development.DevAppServerMain$StartAction.apply(DevAppServerMain.java:164)
at com.google.appengine.tools.util.Parser$ParseResult.applyArgs(Parser.java:48)
at com.google.appengine.tools.development.DevAppServerMain.<init>(DevAppServerMain.java:113)
at com.google.appengine.tools.development.DevAppServerMain.main(DevAppServerMain.java:89)

 

i have try also with partner library but the error is the same

  • July 14, 2010
  • Like
  • 0

For Example:::

 

Can we display all the activities(events,tasks) in a graphical manner..Like which activity should be completed in which month.All the completed activities with one symbol...

hey i am trying to see the test vf page of the integration with facebook

and i am getting a black page

i am filling the facebookapplist object with the appkey and the appsecret values and after

trying to load the vf test page all the rest of the fields in the facebookapplist are filled with values (the values which equals to the facebook application like the app_id)

 

 

maybe the problem is that monthly_active_users = 0 or weekly_active_users = 0 or  daily_active_users = 0

 

if you have any suggestions it would be very helpful

 

thanks 

  • March 24, 2009
  • Like
  • 0
Hello.  I am currently doing pdf generation using an external web service that i wrote - but i'm looking to move the functionality into sfdc using the new apex to pdf.  The pdf that i generate has multiple pages - all with a common header (with images).  I've seen from other threads that this isn't quite supported in any automated fashion (http://community.salesforce.com/sforce/board/message?board.id=Visualforce&thread.id=3205).  So I guess the alternative is to foce page breaks and re-draw the header. 

My pdf will have either one or two dynamic pages (based on the number of line items), and 4 static pages (terms of sale, etc).  So the static pages are easy, but my question is, can I conditionally draw the second dynamic page?  That is, if I have more than 6 line items, draw the second dynamic page.  Otherwise, go straight to the static pages.  Is this possible using the VF markup?  Are there any samples with forced page breaks?  I found one thread where a page break is forced, but there's no conditional logic around it (http://community.salesforce.com/sforce/board/message?board.id=Visualforce&message.id=3880).  Do I just throw all of the necessary logic into the apex:repeat block?

Thanks
Chris
  • August 05, 2008
  • Like
  • 0