• MohanaGopal
  • NEWBIE
  • 30 Points
  • Member since 2008

  • Chatter
    Feed
  • 1
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 33
    Questions
  • 65
    Replies
I'd like to prevent users from repeatedly clicking on a custom button I've created.

Right now I have a button that will create a custom task via an AJAX call on the contacts page. On the returning AJAX call, I reRender the list of Activites associated with this contact.

However, I need a way to provide visual feedback to disable the button after a user clicks it.

I've seen this work on QuickSave button and am wondering how to implement this.

Thanks
-P

Here is the code for reference. (I've removed the inital "
apex:page standardController="Contact" extensions="customController" tabStyle="Contact">
apex:detail subject="{!contact}" relatedList="false"/>
apex:form >
apex:commandButton reRender="activitiesPanel" status="activityStatus" action="{!markContactAsSentEmail}" value="Add task for contact"/>
/apex:form>
apex:outputPanel id="activitiesPanel">
apex:actionStatus id="activityStatus" startText="Refreshing Activity History...">
apex:facet name="stop">
apex:relatedList id="activitiesList" list="ActivityHistories" />
/apex:facet>
/apex:actionStatus>
/apex:outputPanel>



Message Edited by parkerAPT on 12-23-2008 02:15 PM
Hi...
 
        In my sandbox org I got Index 4, Size 4 error when I give renderas pdf for my VF page ..
 
My VF page work fine in HTML format.. I have to render a PDF when I click a Detail page button....
 
Some records rendered a PDF correctly.. Some record I got a error index 4, Size 4.....
 
How to avoid it...  How to fix this problem...
 
 
 
 
 
Hi..
 
          I have overrided my custom object delete button using S-control... 
 
Because when I delete my record I have to delete this connector object record also.. 
 
There is no master detail connection between my object and connector object..
 
Here is my code..
 
Code:
<html> 
<script type="text/javascript" src="/soap/ajax/9.0/connection.js"></script> 
<script> 
function init() 
{
var taskqry=sforce.connection.query("select Id,Project__c from Custom_Tasks__c where Id='{!Lighting_Measures__c.TaskId__c}'");
var taskRec=taskqry.getArray('records');

var conf=confirm('Its delete connector object records also.Do you want to continue');
if(conf==true)
{
try{
var conObj=sforce.connection.query("select Id,Lighting_Measures__c from Task_Connector__c where ID ='{!Lighting_Measures__c.Id}'");
}catch(e){alert(e);}
alert(conObj);

var conRec=conObj.getArray('records');
alert(conRec.length);

for(i=0;i<conRec.length;i++)
{
alert(conRec[i]);
var delConRec=sforce.connection.deleteIds([conRec[i]]); 
}

var delrec=sforce.connection.deleteIds(['{!Lighting_Measures__c.Id}']); 

window.parent.location.replace("https://na5.salesforce.com/"+prjRec[0].Id); 
} 
else
{
window.parent.location.replace("https://na5.salesforce.com/"+taskRec[0].Project__c ); 
}
}
init(); 
</script> 
</html>

 
I got following error
 
Code:
---------------------------
Windows Internet Explorer
---------------------------
{faultcode:'sf:INVALID_FIELD', faultstring:'INVALID_FIELD: 
select Id,Lighting_Measures__c
          ^
ERROR at Row:1:Column:11
No such column 'Lighting_Measures__c' on entity 'Task_Connector__c'. 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.', detail:{fault:{exceptionCode:'INVALID_FIELD', exceptionMessage:'
select Id,Lighting_Measures__c
          ^
ERROR at Row:1:Column:11
No such column 'Lighting_Measures__c' on entity 'Task_Connector__c'. 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.', row:'1', column:'11', }, }, }
---------------------------
OK   
---------------------------

 
But In my Task_connector__c object I have a field 'Lighting_Measures__c' ..
 
What is the problem here...
 


Message Edited by MohanaGopal on 01-07-2009 11:54 PM
Hi..
    
       Here I am using styleclass in my PDF.. I have two issues..
 
1. I got my expected output while I am using outputtext instead of outputfield.. If I am using outputfield in VF page
    my styleclass doesnt work..
 
                If I am using inline style with outputfield  my PDF is rendered correctly...
 
                What is the problem here...
 
2.I got one blank first page in my PDF.... How to avoid it...
 
Here is my code
Code:
<apex:page standardcontroller="Account"  renderas="pdf"
<style>
.centerHeader1
{
font-size:130%;
font-weight:bold;
text-align:center;
}
.leftHeader
{
font-size:50%;
text-align:right;
}
.centerHeader2
{
font-size:50%;
text-align:center;
}
.imageHeader
{
width:90px;
height:50px;
}
</style>
<apex:form >
<div style="page-break-before:always">
<table width="100%"><tr>
<td align="left" width="33%">
<apex:outputtext styleclass="leftHeader" value="leftHeader class"/><br/>
</td>
<td align="center" width="33%">
<i>
<apex:outputtext styleclass="centerHeader1" value="centerHeader1 class"/></i><br/>
<apex:outputtext styleclass="centerHeader2" value="centerHeader2 class"/>
</td>
<td align="right" width="33%">
<!-- <apex:image value="{!$Resource.Logo_PDF}" styleclass="imageHeader"/> -->
</td>
</tr>
</table>
<br/><br/>
<!-- <apex:outputfield value="{!Account.Name}" styleclass="centerHeader1"/> -->
<apex:outputtext value="{!Account.Name}" styleclass="centerHeader1"/>
</div>
</apex:form>
</apex:page>

 
Hi..
 
I got this from
 
Code:
decimal tax=0;
public decimal getTax()
{
    return tax.divide(1,2,system.roundingmode.up);
}

 

If tax value is 12.232343 then
 
I got a answer 12.23 (That is I  need )

But if tax value is 0 then

I got a answer 0.0

I have to display 0.00 in a PDF instead of  0.0 

How to achieve this....

Hi...
 
        I have to display parent and child object details in tree based Table structure in PDF..
 
IE
 
      Name                                             Amount             Total
      Grand Parent object Name 1        G.Amount         G.Total_G__c
      Parent Name1                               P.Amount         P.Total_Parent__c
      Child 1                                           C.Amount         C.Date_Child__c 
      Child 2                                           C.Amount         C.Date_Child__c 
      Child 3                                           C.Amount         C.Date_Child__c 
      Grand Parent object Name 2        G.Amount         G.Total_G__c
      Parent Name  2                             P.Amount         P.Total_Parent__c
      Child 4                                           C.Amount         C.Date_Child__c 
      Child 5                                           C.Amount         C.Date_Child__c 
      Child 6                                           C.Amount         C.Date_Child__c 
      Grand Parent object Name 3        G.Amount         G.Total_G__c
      Parent Name 3                              P.Amount         P.Total_Parent__c
      Child 7                                           C.Amount         C.Date_Child__c 
      Parent Name 4                              P.Amount         P.Total_Parent__c
      Child 8                                           C.Amount         C.Date_Child__c 
      Child 9                                           C.Amount         C.Date_Child__c 
     
 
Here my relation is
 
Child has Parent lookup.. Parent has GrandParent Lookup
 
Grand Parent Fields Amount & Total
Parent Fields Amount & Date
Child  Fields Amount & Date
 
Above are sample fields.. My requirement is like that...
 
How to achieve my requirement..
 
I think Datatable and repeat method will help me...
 
Any one has a sample code,  that will help more...
 
I dont know how to achive this....

Hi,,

I have override child new button as VF page, When I click new button in Parent Related list I need to display  parent name in corresponding field in Child page.. I have to fetch values based on the parent id from another object and displayed it in child page.. But my case Parent Id is display as null ..

My code is
  <apexageBlockSection title="Information" id="info">
    <apex:inputField id="CurrentProject" value="{!Calculated_Measures__c.Project__c}"/>
  </apexageBlockSection>

Any one send sample code for resolve my problem..

Hi,
      How to create multiselect picklist in visual force...(without using inputfield option that is custom picklist)
 
using <apex:selectlist >  we can create picklist..
If we add multiselect=true attribute to selectlist option then its just enable multiselection is enable...
 
Here select options are dynamically changed based on the Lookup selection...
Here I have two questions
1)How we can create multiselect picklist...?
2)How to add items based on the lookup selection.......? (Onblur option doesnt work properly)
 
Any one send some sample code for it...?
 
Hi...
 
       I want to pass inputtext field value to controller.
 
In controller based on this value I have to do some calculation..
 
I know settermethod is used for it..  I couldnt understand the example which u gave in user guide..
 
Any one send some sample code for
   ------how to pass input text value to controller 
   ------In controller how to recieve this value.. Based on this value I have to do some calculation 
   ------the result is displayed in another inputtext in UI.....
How to achive it.
 
 
 
 
Hi..
      I have create one custom list button in  my custom object (A)  as VF page.. This object is related to master detail look up to another custom object (B)....
      That is  A is child B is Parent... 
 When I click my custom list button  from related list of Parent object (B) I have to access parent object fields...
 
How is it possible...
 
I try following code for passing parent id to VF page in onclick  of java script for calling this VF page.. It doesnt work properly...
That is parent id goes blank to the url
 
window.location.href = '/apex/myvfpagename?id={!A__c.B__c}';
 
Any one give some sample code for accessing parent fields or passing parent id to VF page....
Hi...
    In my visual force page I am using two get methods one is binding with inputfield and another one is inputtext...
 
If my get method query returns 0 record then it shows
 
System.QueryException: List has no rows for assignment to SObject

Class.Control1.getPerSav: line 11, column 7
External entry point
 
How to avoid it...
 
 I saw a sample code for selectlist avoiding this error.. I have implemented it in following code..
 
Any one give sample code for avoiding those error in  inputfield and inputtext...
 
Apex class 
 
public class Control1
{
private Calculated_Measures__c calculatedControl;

List<SelectOption> componentList = null;

public List<SelectOption> getComponents()
{
 componentList = new List<SelectOption>();
 New_List__c[] p;
 componentList.add(new selectoption('',''));
 p=[select Id,Name from New_List__c where Measure__c='Control'];
 if (p.size() >-1)
  {
         for(integer i = 0; i < p.size(); i++)
         {
              componentList.add(new selectoption(p[i].Id,p[i].Name));
         }
  }   
  
        return componentList;
}

public Control1(ApexPages.StandardController stdController)
{
this.calculatedControl = (Calculated_Measures__c)stdController.getRecord();
}
}
 
 
Hi...
   I have created one custom list button. When I clicks I want to invokes one visualforce page...
 
Now I am using
 Content Source: Onclick javascript
 
in script
window.location.href = 'orgid/apex/myvfpagename';
 
Visual Force Page
 
Standard controller is ="Calculated_Measures__c"
Parent object is =Project__c
 
In my VF I am using =
 <apex:inputField id="CurrentProject" value="{!Calculated_Measures__c.Project__c}"/>
 
But it shows blank in UI...
 
I am also try
 
window.location.href = 'orgid/apex/myvfpagename{mergefield parent Id}';
In the url parent id is doesnt appear...
 
My question is how to pass parent object id to the visual force or how to access parent id in that vf page..
 
I need to display Name of parent object ,, But that is custom list button
 
Any one send sample code for this....
 
 
 
Hi..
    
  Can I use condition in Visual Force Page for follwing code...
 
My original code is
 
Apex class:
 
public class Library
{
    public List<Library__c> getLTH()
    {
        return [select Name,Page_Link__c from Library__c];
    }
}
 
Page code:
 
<apex:page sidebar="false" controller="Library">
   <br/><b>Library</b>
    <apex:dataTable value="{!LTH}" var="lib" cellpadding="5">
     <apex:column ><apex:outputLink value="{!lib.Page_Link__c}">{!lib.Name}</apex:outputLink></apex:column>
  </apex:dataTable>
</apex:page>
 
 
    The above Apex class query return around 1000 records.. 
 
    I want to filter records based on Name fileds again for some reason..
 
Can I use if condition here...
ex: if(lib.Name=="Test")
{
    <apex:column ><apex:outputLink value="{!lib.Page_Link__c}">{!lib.Name}</apex:outputLink></apex:column>
}
Is this possible in VF.
 
I can use this condtion in Apex class... ( return [select Name,Page_Link__c from Library__c where Name ='Test']; )
But Like this condition I have to check 25 different Names.. Each result is shown in separate VF page... So I have to create
25 separate Apex class and call this class as a controller in 25 VF page... So that only I am using I want to use If condition in Page code for avoiding 25 same type of apex class... How can I avoid it...
 
Please give some suggestion
 
 
 
 
 


Message Edited by MohanaGopal on 08-18-2008 03:09 AM
Hi..
   I am not familiar with VF.
              In my developer login I create one visual force tab..    
              When I click that tab I want to display my visual force page without side bar..
              In this page I have many links to another vf page..
              I wants those pages also show without side bar..
             <apex:outputLink value="https://na2.salesforce.com/apex/LT_EE" > Waste Water</apex:outputLink>  
             I am using above code for display my another page..
            
    Using S-control I can achive it.. How can I do this in VF..
 
            
Hi..
      How can I access more than one objects fields in Visual force..
 
I have to design visual force page with five textfields.. I want to bind each input text fields with different custom object fields.. Is it possible in Visual force..
 
I have already create this in S-controls... I am using one button when I click this button text box values are updated in corresponding objects...  How can I achieve  this in Visual force..
 
             If it possible any one send sample code for it...
 
 
 
What is the difference between synchronous call and asynchronous call in a soql query.. Which one is best...

Hi..

   I have one issue.. If  apex.query()  in Flex returns null value means how to handle it..

In my case it shows "TypeError: Error #1009: Cannot access a property or method of a null object reference."

which query return null value in Salesforce. That is record length is 0. But in flex I dont know why it couldnt handle null value.. If my flex query return 1 or more records means it works properly..

        Its shows error when my query doesnt return any value, even i could nt get queryresult for it.

How to handle it..

Hi..
      -- How can I passing values to Flex from salesforce for query retrival process..?
                 I have used one list button in my Custom object.. when I click list button it calls the flex application using S-controls.. In my flex I have to query based on parent record id or some fileds.. In salesforce we can used merge fields for identify the parent objects... How is it possible in Flex..               
      -- How can I use two query in Flex..?
                  I have to retrive data from two tables in different condition.. I have to display this result in two data grids..  How can I use this..
Any one have sample code..
Please Send me..
In my S-Control I am using follwing query for find who is logged in
      
var query=sforce.connection.query("Select User_ID__c,gos__c,Name from CO_page__c where User_ID__c='{!$User.Username}'");
Like that how can i used in flex coding
 

apex.query("select Name,gos__c,User_ID__c from CO_page__c where User_ID__c='{!$User.Username}'",

When i use this S-Control code I have following message and blank output..
    
TypeError: Error #1009: Cannot access a property or method of a null object reference.
 at <anonymous>()[C:\Documents and Settings\Administrator\My Documents\Flex Builder 3\Test\src\Test.mxml:28]
 at com.salesforce::AsyncResponder/result()[/home/jamesw/projects/mavericks/sdk/src/com/salesforce/AsyncResponder.as:90]
 at SalesForceResponder/result()[/home/jamesw/projects/mavericks/sdk/src/com/salesforce/Connection.as:1303]
 at mx.rpc::AsyncToken/http://www.adobe.com/2006/flex/mx/internal::applyResult()[E:\dev\3.0.x\frameworks\projects\rpc\src\mx\rpc\AsyncToken.as:197]
 at mx.rpc.events::ResultEvent/http://www.adobe.com/2006/flex/mx/internal::callTokenResponders()[E:\dev\3.0.x\frameworks\projects\rpc\src\mx\rpc\events\ResultEvent.as:159]
 at mx.rpc::AbstractInvoker/http://www.adobe.com/2006/flex/mx/internal::dispatchRpcEvent()[E:\dev\3.0.x\frameworks\projects\rpc\src\mx\rpc\AbstractInvoker.as:165]
 at mx.rpc::AbstractInvoker/http://www.adobe.com/2006/flex/mx/internal::resultHandler()[E:\dev\3.0.x\frameworks\projects\rpc\src\mx\rpc\AbstractInvoker.as:191]
 at mx.rpc::Responder/result()[E:\dev\3.0.x\frameworks\projects\rpc\src\mx\rpc\Responder.as:41]
 at mx.rpc::AsyncRequest/acknowledge()[E:\dev\3.0.x\frameworks\projects\rpc\src\mx\rpc\AsyncRequest.as:74]
 at DirectHTTPMessageResponder/completeHandler()[E:\dev\3.0.x\frameworks\projects\rpc\src\mx\messaging\channels\DirectHTTPChannel.as:381]
 at flash.events::EventDispatcher/dispatchEventFunction()
 at flash.events::EventDispatcher/dispatchEvent()
 at flash.net::URLLoader/onComplete()
 
How can i avoid it..
Hi.
   I want to remove Home tab from my customer portal.
 
I want to remove all standard and custom tabs from my customer portal.. I have remove all my custom tabs and standard tabs, but the home tab is still there.. I want to remove all tabs..
            
Hi,
   We have Enterprise Edition. In my customer portal we are using web tab. When we click that web tab it shows one link name is 'download' and some content is displayed. I need, when a user click that download link it open a PDF file which is stored in documents. Its work fine in my normal Enterprise Edition. But when i click that link in customer portal it shows "Insufficient Privileages" message.
         How to give the Privileages to access the PDF file in Customer Portal login.
Hi...
 
        In my sandbox org I got Index 4, Size 4 error when I give renderas pdf for my VF page ..
 
My VF page work fine in HTML format.. I have to render a PDF when I click a Detail page button....
 
Some records rendered a PDF correctly.. Some record I got a error index 4, Size 4.....
 
How to avoid it...  How to fix this problem...
 
 
 
 
 
Hi..
 
          I have overrided my custom object delete button using S-control... 
 
Because when I delete my record I have to delete this connector object record also.. 
 
There is no master detail connection between my object and connector object..
 
Here is my code..
 
Code:
<html> 
<script type="text/javascript" src="/soap/ajax/9.0/connection.js"></script> 
<script> 
function init() 
{
var taskqry=sforce.connection.query("select Id,Project__c from Custom_Tasks__c where Id='{!Lighting_Measures__c.TaskId__c}'");
var taskRec=taskqry.getArray('records');

var conf=confirm('Its delete connector object records also.Do you want to continue');
if(conf==true)
{
try{
var conObj=sforce.connection.query("select Id,Lighting_Measures__c from Task_Connector__c where ID ='{!Lighting_Measures__c.Id}'");
}catch(e){alert(e);}
alert(conObj);

var conRec=conObj.getArray('records');
alert(conRec.length);

for(i=0;i<conRec.length;i++)
{
alert(conRec[i]);
var delConRec=sforce.connection.deleteIds([conRec[i]]); 
}

var delrec=sforce.connection.deleteIds(['{!Lighting_Measures__c.Id}']); 

window.parent.location.replace("https://na5.salesforce.com/"+prjRec[0].Id); 
} 
else
{
window.parent.location.replace("https://na5.salesforce.com/"+taskRec[0].Project__c ); 
}
}
init(); 
</script> 
</html>

 
I got following error
 
Code:
---------------------------
Windows Internet Explorer
---------------------------
{faultcode:'sf:INVALID_FIELD', faultstring:'INVALID_FIELD: 
select Id,Lighting_Measures__c
          ^
ERROR at Row:1:Column:11
No such column 'Lighting_Measures__c' on entity 'Task_Connector__c'. 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.', detail:{fault:{exceptionCode:'INVALID_FIELD', exceptionMessage:'
select Id,Lighting_Measures__c
          ^
ERROR at Row:1:Column:11
No such column 'Lighting_Measures__c' on entity 'Task_Connector__c'. 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.', row:'1', column:'11', }, }, }
---------------------------
OK   
---------------------------

 
But In my Task_connector__c object I have a field 'Lighting_Measures__c' ..
 
What is the problem here...
 


Message Edited by MohanaGopal on 01-07-2009 11:54 PM
Struggling with understanding how to create testmethods so I can package my code to move from development to production.   While there is  information in the manuals, blogs, and discussion boards,  creating testmethods is still confusing.   From the discussion boards, I see that I'm not alone.  I've searched, but haven't been able to find an example testmethod for Lists.....
 
Could someone describe:
- How they determine what needs to be tested,  and
- How they would go about testing the following sample code  (from cookbook)
and provide testmethod code for this sample List code.
 
Code:
VF Page:
<apex:page controller="sampleCon">
<apex:form >
   <apex:selectCheckboxes value="{!countries}">
   <apex:selectOptions value="{!items}"/>
    </apex:selectCheckboxes><br/>
    <apex:commandButton value="Test" action="{!test}" rerender="out" status="status"/>
</apex:form>
<apex:outputPanel id="out">
<apex:actionstatus id="status" startText="testing...">
   <apex:facet name="stop">
    <apex:outputPanel >
      <p>You have selected:</p>
      <apex:dataList value="{!countries}" var="c">{!c}</apex:dataList>
    </apex:outputPanel>
   </apex:facet>
  </apex:actionstatus>
 </apex:outputPanel>
</apex:page>


CONTROLLER Code:
public class sampleCon {
String[] countries = new String[]{};
public PageReference test() {
return null;
}
public List<SelectOption> getItems() {
List<SelectOption> options = new List<SelectOption>();
options.add(new SelectOption('US','US'));
options.add(new SelectOption('CANADA','Canada'));
options.add(new SelectOption('MEXICO','Mexico'));
return options;
}
public String[] getCountries() {
return countries;
}
public void setCountries(String[] countries) {
this.countries = countries;
}
}

Thanks in advance.... 


 
Hi all,

I would like to create table columns dynamically.
The object is known (i.e Account) but the field list is dynamic.I can add or remove field from the list.
So I need a mechanism that will allow me to render fields, and create my table dynamically.

Here is my Page code :

Code:
<apex:repeat value="{!Accounts}" var ="Account"> 

<apex:outputText value="{!Account.?????????}" /><br/>
</apex:repeat>
 


Any Idea ?
Hi,
 
Can we create this in apex page?
 

 

Tasks

 

Status

 

Current year

Task 1

planned

J

F

M

A

M

J

J

A

S

O

N

D

Task 2

Failed

J

F

M

A

M

J

J

A

S

O

N

D

I tried the code below but doesn't give me what I want.

Do you have any idea on how I can achieve this?

Thanks

Pat

Code:
<apex:pageBlock title="Practice Management">
<table class ="list" border ="0" cellspacing = "0"  cellpading="0">
<tr class="hearderRow"><th scope="col" class="">Tasks</th><th scope="col" class="">Status</th><th scope="col" class="">This year</th><th scope="col" class="">Next year</th></tr>
  <tr><td scope="col">{!pr.Task_1__c}</td><td scope="col" class="">{!pr.Status__c}</td><td scope="col" class="">{!pr.month__c}</td><td scope="col" class="">{!pr.Month__c}</td><td scope="col" class="">{!pr.Month__c}</td></tr>
 <tr><td scope="col">{!pr.Task_2__c}</td><td scope="col" class="">{!pr.Status__c}</td><td scope="col" class="">{!pr.Month__c}</td></tr>

 </table>
  
   </apex:pageblock>


 

  • December 27, 2008
  • Like
  • 0
How to display the contact Name in VF page.
Below is the example, I want to display Contact Name in VF_Page.
Any Suggestions.

Code:
<apex:page controller="Relationships">
<apex:dataTable value="{!Accounts}" var="a">
<apex:column headervalue="Name" value="{!a.Id}"/>
<apex:column headervalue="Name" value="{!a.Contact.Name}"/>
</apex:dataTable>
</apex:page>

public class Relationships 
{
    public List<Account> getAccounts()
    {
        List<Account> AL = new List<Account>();
        AL = [SELECT Id, (SELECT Name FROM Contacts WHERE Name != '') FROM Account];
        return AL;
    }
}

 
I'd like to prevent users from repeatedly clicking on a custom button I've created.

Right now I have a button that will create a custom task via an AJAX call on the contacts page. On the returning AJAX call, I reRender the list of Activites associated with this contact.

However, I need a way to provide visual feedback to disable the button after a user clicks it.

I've seen this work on QuickSave button and am wondering how to implement this.

Thanks
-P

Here is the code for reference. (I've removed the inital "
apex:page standardController="Contact" extensions="customController" tabStyle="Contact">
apex:detail subject="{!contact}" relatedList="false"/>
apex:form >
apex:commandButton reRender="activitiesPanel" status="activityStatus" action="{!markContactAsSentEmail}" value="Add task for contact"/>
/apex:form>
apex:outputPanel id="activitiesPanel">
apex:actionStatus id="activityStatus" startText="Refreshing Activity History...">
apex:facet name="stop">
apex:relatedList id="activitiesList" list="ActivityHistories" />
/apex:facet>
/apex:actionStatus>
/apex:outputPanel>



Message Edited by parkerAPT on 12-23-2008 02:15 PM
Hi..
 
I got this from
 
Code:
decimal tax=0;
public decimal getTax()
{
    return tax.divide(1,2,system.roundingmode.up);
}

 

If tax value is 12.232343 then
 
I got a answer 12.23 (That is I  need )

But if tax value is 0 then

I got a answer 0.0

I have to display 0.00 in a PDF instead of  0.0 

How to achieve this....

Hi...
 
        I have to display parent and child object details in tree based Table structure in PDF..
 
IE
 
      Name                                             Amount             Total
      Grand Parent object Name 1        G.Amount         G.Total_G__c
      Parent Name1                               P.Amount         P.Total_Parent__c
      Child 1                                           C.Amount         C.Date_Child__c 
      Child 2                                           C.Amount         C.Date_Child__c 
      Child 3                                           C.Amount         C.Date_Child__c 
      Grand Parent object Name 2        G.Amount         G.Total_G__c
      Parent Name  2                             P.Amount         P.Total_Parent__c
      Child 4                                           C.Amount         C.Date_Child__c 
      Child 5                                           C.Amount         C.Date_Child__c 
      Child 6                                           C.Amount         C.Date_Child__c 
      Grand Parent object Name 3        G.Amount         G.Total_G__c
      Parent Name 3                              P.Amount         P.Total_Parent__c
      Child 7                                           C.Amount         C.Date_Child__c 
      Parent Name 4                              P.Amount         P.Total_Parent__c
      Child 8                                           C.Amount         C.Date_Child__c 
      Child 9                                           C.Amount         C.Date_Child__c 
     
 
Here my relation is
 
Child has Parent lookup.. Parent has GrandParent Lookup
 
Grand Parent Fields Amount & Total
Parent Fields Amount & Date
Child  Fields Amount & Date
 
Above are sample fields.. My requirement is like that...
 
How to achieve my requirement..
 
I think Datatable and repeat method will help me...
 
Any one has a sample code,  that will help more...
 
I dont know how to achive this....
Using the page attribute render-as="pdf" is giving me a monochrome PDF despite the use of CSS on the page to set the background-color in some table cells. The background colors render fine in HTML but are absent in PDF. Is it possible to get color in the PDF (color fidelity not an issue)?
  • December 09, 2008
  • Like
  • 0
Hi,
 
I have a datatable which fetches some data from the Account object using variable called accounts. Now i want some more data to appear in the table which is not part of Account object. So using controller class iam fecthcing the values from different object and storing it in another varaible. Now can i pass these two variables in datatable tag. If so, then please let me know how it can be done?
 
Please Help.
 
Thanks in advance
Priya
  • July 10, 2008
  • Like
  • 0
Hi,
 
I am rendering a page as a 'pdf' and i have used 'renderAs' attribute of apex:page. My page needs to have some checkbox on it but in pdf form those checkboxes are not visible. When I remove the renderAs='pdf' from the code, the page comes up properly with checkbox. How do I make those checkboxes visible in pdf?
 I tried using both apex:inputCheckBox and html checkbox but none of them works.
 
Thanks
Jina
   Hi All

I have created a Flex based Application which contain some Salesforce Information .

Now I need to display that Flex Application in VF Page .

I can create an S-Controls form Flex File but I don't know How to Call the Flex File(.swf File) in VF Page .

One way which I know is by making Static Resources of that .swf File and then and then call that file in VF page . but in this case I was not able to login in Salesforce through my Flex Application (.swf File).
 
Any one can advice me how to do that .

Thanks
Vivek Manchanda