• Chi-Towns Finest
  • NEWBIE
  • 75 Points
  • Member since 2012

  • Chatter
    Feed
  • 3
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 0
    Questions
  • 12
    Replies

I am adding a custom field to the AccountHierarchyTree and have been able to successfully add this field BUT it is showing the SalesForce ID rather than the text.  The field I am adding is a Lookup field to another account so the SalesForce ID of the account is displaying when I would like the Account Name to display.  I added the following to the component but assume there is either something I need to add or use instead of apex:outputText.  Any help is greatly appreciated!  Thanks!

 

 <apex:outputText style="{!IF(pos.currentNode,'font-weight: bold;','')}" value=", {!pos.account.Related_Program__c}" rendered="{!IF(pos.account.Related_Program__c != '', true, false)}"/>
  • February 27, 2012
  • Like
  • 0

When a new row is added, the data from the other rows is cleared. How can I keep the previously entered data even if the entire table is rerendered.

 

Here is the code:

 

VF:

 

<apex:page standardController="Projects__c" extensions="addMultipleBurnsController" showHeader="true" sidebar="true">
 

 <apex:pageBlock title="{!Projects__c.Project_Name__c}" mode="maindetail">
     <apex:pageBlockSection title="Project Information">
         <apex:outputField value="{!Projects__c.Name}"/>
         <apex:outputField value="{!Projects__c.Project_Name__c}"/>
         <apex:outputField value="{!Projects__c.Status__c}"/>
         <apex:outputField value="{!Projects__c.Start_Date__c}"/>
         <apex:outputField value="{!Projects__c.Go_Live_Date__c}"/>
         <apex:outputField value="{!Projects__c.End_Date__c}"/>
     </apex:pageBlockSection>
     <apex:pageblocksection title="Project Details">
         <apex:outputField value="{!Projects__c.Sold_Hours__c}"/>
         <apex:outputField value="{!Projects__c.Goal_Hours__c}"/>
         <apex:outputField value="{!Projects__c.Planned_Hours__c}"/>
         <apex:outputField value="{!Projects__c.Pricing_Method__c}"/>
     </apex:pageblocksection>
 </apex:pageBlock>
 
 <apex:form >
 <apex:pageblock title="Add Multiple Burns">
     <apex:pageblockButtons >
         <apex:commandButton value="Save" action="{!save}" rerender="error"/>
         <apex:commandButton value="Add Row" action="{!addRow}" rerender="table,error" immediate="true"/>
         <apex:commandButton value="Remove Row" action="{!removeRow}" rerender="table,error" immediate="true"/>
     </apex:pageblockButtons>
     <apex:pageBlockTable value="{!burns}" var="a" id="table">
         <apex:column headerValue="Burn" width="125px">
             <apex:inputField value="{!a.Name}" required="true"/>
             <apex:inputField value="{!a.Burn_Status__c}"/>
         </apex:column>
         <apex:column headerValue="Resources" width="125px">
             <apex:inputField value="{!a.Resource_Type__c}"/><br />
             <apex:inputField value="{!a.Resource__c}"/>
         </apex:column>
         <apex:column headerValue="Dates Start/End" width="125px">
             <apex:inputField value="{!a.Start_Date__c}"/><br />
             <apex:inputField value="{!a.End_Date__c}"/>
         </apex:column>
         <apex:column headerValue="Hours Planned/Type" width="125px">
             <apex:inputField value="{!a.Hours_Planned__c}"/><br />
             <apex:inputfield value="{!a.General__c}"/>
         </apex:column>
         <apex:column headerValue="Details">
             <apex:inputField value="{!a.Burn_Details__c}" style="width:95%"/>
         </apex:column>
     </apex:pageBlockTable>
     
     <p><apex:pagemessages ></apex:pagemessages></p>
     
 </apex:pageblock>
 </apex:form>

</apex:page>

 Controller:

 

public class addMultipleBurnsController {
     
     //Class Variables
     public List<burn__c> burns {get; set;}
     private final projects__c proj;
     
     //Project Controller Extension
     public addMultipleBurnsController(ApexPages.StandardController stdController){
         this.proj = (projects__c)stdController.getRecord();
         burns = new List<burn__c>();
         burn__c theBurn = new burn__c();
         theBurn.Project__c = proj.Id;
         burns.add(theBurn);
         //burns.add(new burn__c());
     }
     
     public void addrow() {
         burn__c theBurn = new burn__c();
         theBurn.Project__c = proj.Id;
         burns.add(theBurn);
         //burns.add(new burn__c());
     }
     
     public void removerow(){
         Integer i = burns.size();
         burns.remove(i-1);
     }
     
     public pageReference save(){
         insert burns;
         PageReference back = new PageReference('/' + proj.Id);
         back.setRedirect(true);
         return back;
     }
     
}

 

Hi,

 

I have done visualforce page for satndard quote.I want to prepopulate opportunity name in this visualforce page.

 

Can any one give idea.

 

Thanks in advance

 

 

Hi,

 

I am developing a visualforce page to show standard page in an iframe. On that iFrame am using standard page as source. I dont want relatedlisthover links on that iframe. But I want relatedlist details.

  • March 05, 2012
  • Like
  • 0

We're using FieldSets to control the fields displayed on a VisualForce page. The output of the page is PDF. For some reason all currency and number fields are displaying in sceintific notiation. 

 

For example:

 

 86,558,710

 

displays as 

 

8.655871E+8

 

Is there anyway to control this? I've tried outputting as text which actually works however there are no commas to seperate the number up. 

 

 

Hi developer heroes,

 

I'd love to pick your brain with the following scenario.

 

Standard Object-Master: Opportunity

Custom Object-Child: Produkt_Ressourcen_Forecast__c

Visualforce Page: ProductResourceForecast

Controller Extension: extForecastProducts

 

What I try to accomplish is an "Edit all" VS page for the custom object. When I click on "Edit all" the following error pops up:

 

Error: Id value 006L0000002BRTw is not valid for the Produkt_Ressourcen_Forecast__c standard controller 

 

The interesting part is, when checking the Id mentioned above it matches the Oppty Id the custom object belongs to.

 

I skimmed the boards already but I wasn't able to get this one fixed myself. Since it is day3 of VF for me, help is much appreciated!

 

--------------------------------

 

The Controller Extension:


public class extForecastProducts{
private final Produkt_Ressourcen_Forecast__c ForecastProducts;

List<Produkt_Ressourcen_Forecast__c> lstForecastProducts;

Opportunity ForecastProductsNew;

public extForecastProducts(ApexPages.StandardController controller) {
this.ForecastProducts= (Produkt_Ressourcen_Forecast__c)controller.getRecord();


// get Oppty Id from custom object where current id matches


Id Opps= [Select OpportunityID__c FROM Produkt_Ressourcen_Forecast__c 
where Id =: ApexPages.currentPage().getParameters().get('id')].OpportunityID__c;
lstForecastProducts = (List<Produkt_Ressourcen_Forecast__c>)[ 

// get fields of custom object


Select Id,
Contact__c, 
Cost__c, Cost_Type__c, 
Forecast_Product__c,
ID__c,
Forecast_Quantity__c,
Forecast_Unit__c, 
Leistung_erbracht__c, 
Mitarbeiter_Rolle__c,
Opportunity_Line_Item_Id__c,
Opportunity_TS_BETA__c,
Product__c,
Product_Code__c,
Profitability__c,
Quantity__c,
Sales_Price__c,
SFDC_Lizenz_Preis__c,
Subunternehmen__c,
To__c,
Total_Cost__c,
Total_Margin__c,
Total_Price__c,
Unit__c, 
OpportunityID__c 

From Produkt_Ressourcen_Forecast__c
where OpportunityID__c =: Opps]; 
ForecastProductsNew = [Select Id, Name From Opportunity Where Id =: Opps];
}
public List<Produkt_Ressourcen_Forecast__c> getlstForecastProducts(){
return lstForecastProducts;
}
public Opportunity getForecastProductsNew(){
return ForecastProductsNew;
}

public PageReference save() {
update lstForecastProducts;
return (new ApexPages.StandardController(ForecastProductsNew)).view();

}

 

The VS Page:

 

<apex:page standardController="Produkt_Ressourcen_Forecast__c" tabStyle="Opportunity" sidebar="false" extensions="extForecastProducts">
<apex:form >
<apex:pageBlock >
<apex:pageMessages />

<apex:pageBlockButtons >
<apex:commandButton value="Save" action="{!Save}"/>
<apex:commandButton action="{!Cancel}" value="Cancel"/>
</apex:pageBlockButtons>

<apex:pageBlockTable value="{!lstForecastProducts}" var="prod" id="prod_table">
<apex:column value="{!prod.Name}"/>
<apex:column headerValue="Opportunity">
<apex:inputField value="{!prod.Opportunity_TS_BETA__c}"/>
</apex:column> 
<apex:column headerValue="Forecast Product">
<apex:inputField value="{!prod.Forecast_Product__c}"/>
</apex:column> 
<apex:column headerValue="Leistung erbracht">
<apex:inputField value="{!prod.Leistung_erbracht__c}"/>
</apex:column>
<apex:column headerValue="Mitarbeiter Rolle">
<apex:inputField value="{!prod.Mitarbeiter_Rolle__c}"/>
</apex:column>
<apex:column headerValue="From">
<apex:inputField value="{!prod.From__c}"/>
</apex:column> 
<apex:column headerValue="To">
<apex:inputField value="{!prod.To__c}"/>
</apex:column> 
<apex:column headerValue="Forecast Quantity">
<apex:inputField value="{!prod.Forecast_Quantity__c}"/>
</apex:column> 
<apex:column headerValue="Forecast Unit">
<apex:inputField value="{!prod.Forecast_Unit__c}"/>
</apex:column> 
<apex:column headerValue="Kontakt">
<apex:inputField value="{!prod.Contact__c}"/>
</apex:column> 
<apex:column headerValue="Subunternehmen">
<apex:inputField value="{!prod.Subunternehmen__c}"/>
</apex:column> 

</apex:pageBlockTable>
</apex:pageBlock>
</apex:form>
</apex:page>

 

THX

Hi there,

 

I created a VF page which opens up on click of a button placed on the Opportunity object. Onclick "save" button I want it to do the following 2 actions

 

1) save the VF page/record

2) email to be sent to few users

 

Request every1 to kindly help me with the code

 

Thanks,

George

 

 

I am adding a custom field to the AccountHierarchyTree and have been able to successfully add this field BUT it is showing the SalesForce ID rather than the text.  The field I am adding is a Lookup field to another account so the SalesForce ID of the account is displaying when I would like the Account Name to display.  I added the following to the component but assume there is either something I need to add or use instead of apex:outputText.  Any help is greatly appreciated!  Thanks!

 

 <apex:outputText style="{!IF(pos.currentNode,'font-weight: bold;','')}" value=", {!pos.account.Related_Program__c}" rendered="{!IF(pos.account.Related_Program__c != '', true, false)}"/>
  • February 27, 2012
  • Like
  • 0

When a new row is added, the data from the other rows is cleared. How can I keep the previously entered data even if the entire table is rerendered.

 

Here is the code:

 

VF:

 

<apex:page standardController="Projects__c" extensions="addMultipleBurnsController" showHeader="true" sidebar="true">
 

 <apex:pageBlock title="{!Projects__c.Project_Name__c}" mode="maindetail">
     <apex:pageBlockSection title="Project Information">
         <apex:outputField value="{!Projects__c.Name}"/>
         <apex:outputField value="{!Projects__c.Project_Name__c}"/>
         <apex:outputField value="{!Projects__c.Status__c}"/>
         <apex:outputField value="{!Projects__c.Start_Date__c}"/>
         <apex:outputField value="{!Projects__c.Go_Live_Date__c}"/>
         <apex:outputField value="{!Projects__c.End_Date__c}"/>
     </apex:pageBlockSection>
     <apex:pageblocksection title="Project Details">
         <apex:outputField value="{!Projects__c.Sold_Hours__c}"/>
         <apex:outputField value="{!Projects__c.Goal_Hours__c}"/>
         <apex:outputField value="{!Projects__c.Planned_Hours__c}"/>
         <apex:outputField value="{!Projects__c.Pricing_Method__c}"/>
     </apex:pageblocksection>
 </apex:pageBlock>
 
 <apex:form >
 <apex:pageblock title="Add Multiple Burns">
     <apex:pageblockButtons >
         <apex:commandButton value="Save" action="{!save}" rerender="error"/>
         <apex:commandButton value="Add Row" action="{!addRow}" rerender="table,error" immediate="true"/>
         <apex:commandButton value="Remove Row" action="{!removeRow}" rerender="table,error" immediate="true"/>
     </apex:pageblockButtons>
     <apex:pageBlockTable value="{!burns}" var="a" id="table">
         <apex:column headerValue="Burn" width="125px">
             <apex:inputField value="{!a.Name}" required="true"/>
             <apex:inputField value="{!a.Burn_Status__c}"/>
         </apex:column>
         <apex:column headerValue="Resources" width="125px">
             <apex:inputField value="{!a.Resource_Type__c}"/><br />
             <apex:inputField value="{!a.Resource__c}"/>
         </apex:column>
         <apex:column headerValue="Dates Start/End" width="125px">
             <apex:inputField value="{!a.Start_Date__c}"/><br />
             <apex:inputField value="{!a.End_Date__c}"/>
         </apex:column>
         <apex:column headerValue="Hours Planned/Type" width="125px">
             <apex:inputField value="{!a.Hours_Planned__c}"/><br />
             <apex:inputfield value="{!a.General__c}"/>
         </apex:column>
         <apex:column headerValue="Details">
             <apex:inputField value="{!a.Burn_Details__c}" style="width:95%"/>
         </apex:column>
     </apex:pageBlockTable>
     
     <p><apex:pagemessages ></apex:pagemessages></p>
     
 </apex:pageblock>
 </apex:form>

</apex:page>

 Controller:

 

public class addMultipleBurnsController {
     
     //Class Variables
     public List<burn__c> burns {get; set;}
     private final projects__c proj;
     
     //Project Controller Extension
     public addMultipleBurnsController(ApexPages.StandardController stdController){
         this.proj = (projects__c)stdController.getRecord();
         burns = new List<burn__c>();
         burn__c theBurn = new burn__c();
         theBurn.Project__c = proj.Id;
         burns.add(theBurn);
         //burns.add(new burn__c());
     }
     
     public void addrow() {
         burn__c theBurn = new burn__c();
         theBurn.Project__c = proj.Id;
         burns.add(theBurn);
         //burns.add(new burn__c());
     }
     
     public void removerow(){
         Integer i = burns.size();
         burns.remove(i-1);
     }
     
     public pageReference save(){
         insert burns;
         PageReference back = new PageReference('/' + proj.Id);
         back.setRedirect(true);
         return back;
     }
     
}

 

Below is my VF page.   Can somebody help with adding the ability to click on a result and take it to record.  

 

<apex:page controller="CampaignList2Con">
<apex:pageBlock >
<apex:pageBlockTable value="{!Campaigns}" var="c">
<apex:column value="{!c.name}"/>
<apex:column value="{!c.id}"/>
</apex:pageBlockTable>
</apex:pageBlock>
</apex:page>

Hi,

 

I have done visualforce page for satndard quote.I want to prepopulate opportunity name in this visualforce page.

 

Can any one give idea.

 

Thanks in advance

 

 

Hi there,

 

This is my code that is calling another CLASS.

 

<apex:page standardController="Opportunity" extensions="ClsIntel_AttachIBQuotePDF" action="{!attachIntel_ViewIBQuote_Attach}">
    <!-- Get Opportunity ID & Name -->
    {!Opportunity.Id}
    {!Opportunity.Name}
</apex:page>

 

My question is - What does this action signify?

action="{!attachIntel_ViewIBQuote_Attach}">????

 

I basically need to attach a PDF Document to a Opportunity on a click of a button. I have already developed another Visualforce page which is rendering as PDF.  that one works well. I just want that same PDF to now get it attached to the Oppty when the user clicks on another button.

 

 

What should I write in the *attach*, is it the name of Class that I just create which is attaching the PDF Document or is it name of the page which is getting rendered as a PDF Document.?

 

I am getting this error message:-

\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\

Error: action="{!attachIntelView_IBQuote}": Unknown method 'OpportunityStandardController.attachIntelView_IBQuote()'

///////////////////////////////////////

 

 

What am i missing?

 

Please help. I am new to this, and really lost.

 

 

 

Thanks.