• sgorema
  • NEWBIE
  • 25 Points
  • Member since 2006

  • Chatter
    Feed
  • 1
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 18
    Questions
  • 32
    Replies

We are a multi currency org. I have a visualforce email template in which I need to display a currency field Sales_Price__c. I am using <td><apex:outputField value="{!px.Sales_Price__c}"/></td> to display this field but the problem is that if the user who is sending the email has a default currency of USD and the record being referred to in the email has a currency of GBP the Sales Price is displayed as:

GBP 694.60 (USD 1,000.22)

 

How can I have it simply display the record's currency without the conversion?

 

thanks!

Hi all - I am completely new to the custom controllers and cannot figure out how to perform a save on the page if I am using a custom list controller. Basically I needed to create a custom list controller so that I can define the record set that will be returned in the VF Page. Some of the fields on the page are editable and so I want to have a Save button on the page that will save all of the updated records. Here is the code below for my vf page

<apex:page controller="opportunityList2Con"> <apex:form > <apex:pageBlock > <apex:pageBlockButtons > <apex:commandButton value="Save" action="{!save}"/> </apex:pageBlockButtons> <apex:pageMessages /> <apex:pageBlockTable value="{!opportunities}" var="opp"> <apex:column headerValue="Managers Feel"> <apex:inputField value="{!opp.Manager_Feel__c}"/> </apex:column> <apex:column value="{!opp.StageName}"/> <apex:column value="{!opp.CloseDate}"/> <apex:column > <apex:facet name="header" ><b>Name</b></apex:facet> <apex:outputLink value="/{!opp.id}" > {!opp.name} </apex:outputLink> </apex:column> <apex:column value="{!opp.Owner.Name}"/> <apex:column value="{!opp.Account.Name}"/> <apex:column value="{!opp.Amount}"/> </apex:pageBlockTable> </apex:pageBlock> </apex:form> </apex:page>

and here is the controller. I am not sure how the save should be coded...

 

 

public class opportunityList2Con { public PageReference save() { return null; } public ApexPages.StandardSetController setCon { get { if(setCon == null) { setCon = new ApexPages.StandardSetController(Database.getQueryLocator([select id, name, account.name, stagename, Manager_Feel__c, closedate, amount, owner.name from Opportunity where ownerid = '00530000000jMqE'])); } return setCon; } set; } public List<Opportunity> getOpportunities() { return (List<Opportunity>) setCon.getRecords(); } }

 

We have a requirement to build an editable view that will allow a manager to pull up his/her team's opportunities and quickly make mass updates to the list of records. We have not turned on the inline editable views and have no plans to do so (just not really a fan of them). Even if we did turn it on it would not satisfy our need to show a My Team's perspective of opptys since you can not build an opportunity view based on My Team's data.

 

So I was thinking a VisualForce page? I have already built a page based on a list controller but I am not sure how to configure it to show a list of My Team's Opportunities. Is this possible through a custom controller? We would want to define the Manager - Subordinate relationship through the Role hierarchy. So a manager would see all opptys that belong to the reps with the role that reports to him/her in the hierarchy.

 

Does anyone have any ideas on this or possibly come across a similar solution?

 

thanks

Stephanie

Message Edited by sgorema on 03-30-2009 12:54 PM

We have built a ton of visualforce pages that generate to pdf. These have been working great until a few users recently updated to Adobe Reader 9.0. Now the Adobe Reader opens to a blank screen. Does anyone have a fix or know anything about this issue? thanks!

 

 

I have the following code in both Sandbox and Production and for some reason the calendar pop up will not work on the close date field in production but it works fine in sandbox. Any ideas?

 

<apex:page standardController="Opportunity" recordSetVar="opportunities" tabStyle="Opportunity" sidebar="false"> <apex:form > <apex:pageBlock > <apex:pageMessages /> <apex:pageBlock > <apex:panelGrid columns="2"> <apex:outputLabel value="View:"/> <apex:selectList value="{!filterId}" size="1"> <apex:actionSupport event="onchange" rerender="opp_table"/> <apex:selectOptions value="{!listviewoptions}"/> </apex:selectList> </apex:panelGrid> </apex:pageBlock> <apex:pageBlockButtons > <apex:commandButton value="Save" action="{!save}"/> <apex:commandButton value="Cancel" action="{!cancel}"/> </apex:pageBlockButtons> <apex:pageBlockTable value="{!opportunities}" var="opp" id="opp_table"> <apex:column > <apex:facet name="header" ><b>Name</b></apex:facet> <apex:outputLink value="/{!opp.id}" > {!opp.name} </apex:outputLink> </apex:column> <apex:column headerValue="Stage"> <apex:inputField value="{!opp.stageName}"/> </apex:column> <apex:column headerValue="Close Date"> <apex:inputField value="{!opp.closeDate}"/> </apex:column> </apex:pageBlockTable> </apex:pageBlock> </apex:form> </apex:page>

 

I have a very simple trigger on my opportunity object that will clone an opportunity once the status = Win. I need to add some functionality and have it clone the opportunity products as well. Is this not the same as a deep clone? I tried adding an additional parameter to the Clone function but this did not work. Can anyone help with how I would get the products cloned with the opportunity. Here is code:

trigger RenewalOpportunity on Opportunity (after update) { for (Integer i = 0; i < Trigger.new.size(); i++) { System.debug('checking opportunity ' + i); System.debug('old.isWon: ' + Trigger.old[i].isWon); System.debug('new.isWon: ' + Trigger.new[i].isWon); if (Trigger.new[i].isWon == true && Trigger.old[i].isWon == false) { Date endDate = Trigger.new[i].CloseDate.addDays(365); System.debug('updating opportunity ' + i); Opportunity renewalOpp = Trigger.new[i].clone(false); renewalOpp.Name = 'Renewal - '+ Trigger.new[i].Name; renewalOpp.closedate = endDate; renewalOpp.stagename = 'D - Relationship Management'; insert renewalOpp; if (Trigger.new[i].Name.startsWith('Renewal - ')) { renewalOpp.Name = Trigger.new[i].Name; update renewalOpp; } System.debug('renewal opportunity inserted' + i); System.debug('renewalOpp.id: ' + renewalOpp.ID); System.debug('TriggerNew[i].id: ' + Trigger.new[i].ID); if (Trigger.new[i].isWon == true && Trigger.old[i].isWon == false) { System.debug('Associating generated opportunity as child of closed->won opportunity'); Opportunity newOpp = [select ID from Opportunity where id = :Trigger.new[i].ID]; newOpp.Renewal_Opportunity__c = renewalOpp.ID; update newOpp; } } } }

 

I have a VF page that I am rendering as a PDF doc. This is our actual contract and so the contact start and end dates are displayed on the document. The problem that I just came across is that these start dates and end dates are rendering on the pdf in the locale of the end user who generates the doc. This has become confusing for our centrally located Order Processing group here in the States b/c they are reading the UK date format dd-mm-yyyy in the US format. How can I get the dates to always display in the English(US) locale. Currently I simply diosplaying it using the apex:outputfield tag:
 
Code:
<td><apex:outputField value="{!SFDC_520_Quote__c.Subscription_Start_Date__c}"/></td>

 
thanks!
I have built VF pages to display and render our quote data to PDF format. One issue I am having is displaying the Quote Amount field. If I open up a quote that is in another currency other then my default currency the Amount fields displays something like this:
EUR 8,000.00 (USD 11,600.09)
 
This is fine in the UI but we do not want to see this on the quote. I just want to display the amount in the quote's currency. Currently my code is displaying it as seen above. Here is the code..thanks!
 
Code:
<apex:dataTable value="{!SFDC_520_Quote__c}" var="Quote" cellpadding="4" border="1" align="right">
            <apex:column value="{!Quote.Total_Charges_Calc__c}" width="100"/>
            <apex:column value="{!Quote.Quote_Amount__c}" width="126"/>
</apex:dataTable>

 
Stephanie
I have a VF page that is displaying Quote data. On our custom quote object we have a lookup to the Contact object to store the person who is designated as the System Admin. The field is called System_Admin__c. I need to display this person's name on in a table on the page and thought I could do so by specifying:
 
Code:
<table border = "1">
            <tr>
                <td width=20%>Name:</td>
                <td width=30%>{!SFDC_520_Quote__c.System_Administrator__c}</td>
                <td width=20%>Phone:</td>
                <td width=30%><apex:outputtext value="{!SFDC_520_Quote__c.System_Administrator_Phone__c}" /></td>
            </tr>

 
but this displays the id of the contact record instead of displaying the contact's name. How do I get the Contact name to display?
I am trying to create a VisualForce page that will display Quote and Quote Line Item (both custom objects from the AppExhange application) data. Below is my code but it is erroring out with:
Error: Invalid field SFDC_520_QuoteLine__r for SObject SFDC_520_Quote__c
 
Code:
Error: Invalid field SFDC_520_QuoteLine__r for SObject SFDC_520_Quote__c  
<apex:page renderAs="pdf"
           standardcontroller="SFDC_520_Quote__c">     
        
           <p style="text-align:center; font-size: 100%;">ONESOURCE ORDER SCHEDULE</p>
           <p style="text-align: right; font-size: 80%"> Contract No: <apex:outputtext value=" {!SFDC_520_Quote__c.Contract_Number__c}" /></p> 
           <p style="text-align: left; line-height: .05; font-size: 70%"> <b>Customer Name:</b> <apex:outputtext value=" {!SFDC_520_Quote__c.Opportunity_Account_Name__c}" /></p> 
           <p style="text-align: left; line-height: .05; font-size: 70%"> <b>Customer No:</b> <apex:outputtext value=" {!SFDC_520_Quote__c.Opportunity_Account_PMD_Id__c}" /></p> 
           <p style="text-align: left; line-height: .50; font-size: 70%"> <b>Customer Subscribes to the following OneSource On-line Service(s):</b></p> 

            <apex:dataTable value="{!SFDC_520_Quote__c.SFDC_520_QuoteLine__r}" var="Product">
            <apex:facet name="caption">table caption</apex:facet>
            <apex:facet name="header">table header</apex:facet>
            <apex:facet name="footer">table footer</apex:facet>
            <apex:column footerValue="column footer" value="{!Product.Product_Code__c}"/>
            </apex:dataTable>
            
                  
                                  
  

</apex:page>

 
 
What am I missing?
<SCRIPT type=text/javascript>// var tabId = getCookie('dmTab'); var closeButtonId = 'thePage:theForm:closeButton'; if (tabId && getBottomPanelHeight() > 28) { showCloseButton(closeButtonId, true); } else { showCloseButton(closeButtonId, false); } document.getElementById('thePage:theForm:showControllerLink').style.display = (false) ? 'inline' : 'none'; // </SCRIPT>
Hi everyone - I am building a visualforce page that will be rendered as a pdf - it is our quote. I will need to render this in both Letter page size and A4 page size. Where do I specify this setting?
We have an issue where we have some accounts that have literally 1000's of contacts associated to them. The Sales Rep is really only concerned with a small subset of these contacts and so we would love to have either a seperate related list or even a new view that would should show their 'Sales Contacts'. Is this something that VisualForce could do? Is it possible to add a filter to the datatable component?
Am I correct in thinking that I could build an scontrol with the Ajax toolkit that would allow me to display a subset of an Accounts opportunities and have it look like just another related list on the Account detail page? We would like to show a seperate list of just 'Open' opptys on the Account detail page. Can anyone point me in the direction of sample code that does something similar to this? thanks!
Hello...I am assuming it is possible to call an scontrol from another scontrol? If so, what is the correct syntax? I am using ajax beta3.3.  thanks in advance!
I have created an scontrol in javascript that clones an opportunity and closes out the current oppty. It clones about 35 fields on the oppty record as well as any line items and any contact roles.
 
The whole process is taking about 16 seconds to run. So I started taking out my queries (to get account name (for use in oppty name), line items and contact roles) one by one to see how much they were slowing things down. What I saw was that even with no queries it was taking 8 seconds and then each of the queries added about 3 seconds each.
 
I am wondering if this is normal response time? If I should paste my code here for people to see then let me know. I am new to javascript and so perhaps there is something that I could be doing differently. Any help would be great!
 
Also - Is there a way to display on the screen something like 'Creating Renewal Oppty. Please Wait....' while it is doing all of the processing?
 
thanks!
  • September 07, 2006
  • Like
  • 0
I am not sure what just happened there but here is my question..probably a very easy question but I am new to javascript. I have an scontrol written in javascript and I am getting the value from a date field this way:
 
var OpptyCloseDate = {!Opportunity_Renewal_Close_Date};
 
I am then trying to put this variable into a the Close Date of a newly created oppty...using this:
 
 newoppty.set("CloseDate", OpptyCloseDate);
 
What am I missing? I am getting an error. SUrely I need to do something with the dates I just have no idea what!
 
thanks!

Message Edited by sgorema on 08-30-2006 12:19 PM

I would like to find a way to auto create a renewal opportunity when a new biz opportunity has been closed. I have heard that this can be done through java script on an scontrol. Does anyone have any sample code that does this? I am a beginner to jave script and would love something to at least get me started!
 
thanks!
I am testing out the data loader and am having a problem. I am trying to load a campaign record and though it tells me the load was successful I can not see the campaign record through the UI. What methods are there to see if it was actually inserted or to figure out what the issue is? thanks!

I have a multi-select picklist field (multi__c) on the User object.

I'm writing a after-insert/update trigger on the object.

 

OBJECTIVE: check multi__c. Get values.

1. Then if multi__c==A, insert record on custom object.

 2. if multi__c==B, insert record on custom object.

3. multi__c==A and B, insert two records in custom object.

 

Now, the problem. Which method for picllist do I use to get values of the multiselect picklist?

Is this possible?

Hi -

I am trying to update the pick list values. When i click on save i am ending up with the below error.

 

System.NullPointerException: Attempt to de-reference a null object

Class.MyController.save: line 13, column 14 External entry point

 

 Can someone please advise me how to update the picklist values in the custom object. This is my first app using VF. Searched the doucumentation but no luck...please help.... Here is my code

 

I know i have to write some logic in the pagereference save..but not getting any idea...

 

<apex:page controller="MyController" tabStyle="Award_Tracking__c">
<apex:form >
<apex:pageBlock mode="edit">
<apex:pageBlockTable value="{!Award_Tracking}" var="at">
<apex:column headervalue="Award/Recognition">
<apex:outputText value="{!at.Name_of_Award__c}"></apex:outputText>
</apex:column>
<apex:column headervalue="Reward Options">
<apex:inputField value="{!at.Reward_Option__c}" required="true"/>
</apex:column>
</apex:pageBlockTable>
<apex:pageBlockButtons >
      <apex:commandButton value="Save" action="{!save}"/>
   </apex:pageBlockButtons>

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

 

 

public class MyController
{
Award_Tracking__c awt;

 

public List<Award_Tracking__c> getAward_Tracking()
{
Award_Tracking__c[] lawt=[select Id,Name_of_Award__c,Reward_Option__c from Award_Tracking__c where Award_date__c<=TODAY and Award_expiration_date__c>=TODAY and SFDC_ID__c=:UserInfo.getUserId()];
return lawt;
}

 

 public PageReference save() {

      update awt;
      PageReference AwardShippingPage = new PageReference('/Apex/AwardShipping');
      AwardShippingPage.setRedirect(true);

      return AwardShippingPage;
   }


}

  • March 31, 2009
  • Like
  • 0

We have a requirement to build an editable view that will allow a manager to pull up his/her team's opportunities and quickly make mass updates to the list of records. We have not turned on the inline editable views and have no plans to do so (just not really a fan of them). Even if we did turn it on it would not satisfy our need to show a My Team's perspective of opptys since you can not build an opportunity view based on My Team's data.

 

So I was thinking a VisualForce page? I have already built a page based on a list controller but I am not sure how to configure it to show a list of My Team's Opportunities. Is this possible through a custom controller? We would want to define the Manager - Subordinate relationship through the Role hierarchy. So a manager would see all opptys that belong to the reps with the role that reports to him/her in the hierarchy.

 

Does anyone have any ideas on this or possibly come across a similar solution?

 

thanks

Stephanie

Message Edited by sgorema on 03-30-2009 12:54 PM

We have built a ton of visualforce pages that generate to pdf. These have been working great until a few users recently updated to Adobe Reader 9.0. Now the Adobe Reader opens to a blank screen. Does anyone have a fix or know anything about this issue? thanks!

 

 

I have the following code in both Sandbox and Production and for some reason the calendar pop up will not work on the close date field in production but it works fine in sandbox. Any ideas?

 

<apex:page standardController="Opportunity" recordSetVar="opportunities" tabStyle="Opportunity" sidebar="false"> <apex:form > <apex:pageBlock > <apex:pageMessages /> <apex:pageBlock > <apex:panelGrid columns="2"> <apex:outputLabel value="View:"/> <apex:selectList value="{!filterId}" size="1"> <apex:actionSupport event="onchange" rerender="opp_table"/> <apex:selectOptions value="{!listviewoptions}"/> </apex:selectList> </apex:panelGrid> </apex:pageBlock> <apex:pageBlockButtons > <apex:commandButton value="Save" action="{!save}"/> <apex:commandButton value="Cancel" action="{!cancel}"/> </apex:pageBlockButtons> <apex:pageBlockTable value="{!opportunities}" var="opp" id="opp_table"> <apex:column > <apex:facet name="header" ><b>Name</b></apex:facet> <apex:outputLink value="/{!opp.id}" > {!opp.name} </apex:outputLink> </apex:column> <apex:column headerValue="Stage"> <apex:inputField value="{!opp.stageName}"/> </apex:column> <apex:column headerValue="Close Date"> <apex:inputField value="{!opp.closeDate}"/> </apex:column> </apex:pageBlockTable> </apex:pageBlock> </apex:form> </apex:page>

 

As discussed in Ideas (http://ideas.salesforce.com/article/show/69729) here's a solution we have used for clients to enable customisation of the Clone button on Opportunities. This can be used to selectively choose which fields to copy and set default values:

 

For full details and the code to clone opportunity Line Items please contact me directly. We will be re-writing this in VisualForce over the coming months to make it futureproof.

 

Steps to Implement - Admins only

1. Setup -> Customize -> Opportunity -> Buttons and Links

2. Create new custom button called Clone, behaviour is Execute Javascript, Display Type Detail Page Button.

3. Paste in the code below and edit to match your requirements.

4. Remember to add the new button to the Opportunity page layout(s) and hide the original Clone button.

4. Test!

 

// Copyright 2008 BrightGen Ltd - All Rights Reserved try{ {!REQUIRESCRIPT("/soap/ajax/14.0/connection.js")} // ** EDIT THIS QUERY TO LIST THE FIELDS YOU WANT TO COPY ** var result = sforce.connection.query("Select o.Type, o.StageName, o.Product_Type__c, o.Planned_Opportunity__c, o.MarketSector__c, o.CampaignId, o.Business_Unit__c, o.Amount, o.AccountId From Opportunity o WHERE o.Id = '{!Opportunity.Id}'"); var newOpp = result.getArray("records"); // Reset the Opp Id and reset fields to default values newOpp[0].Id = ''; newOpp[0].Name = "Clone {!Opportunity.Name}"; // ** EDIT THESE FIELDS TO SET DEFAULT ANY VALUES ** newOpp[0].StageName = "1. Prospecting"; newOpp[0].CloseDate = new Date(2099, 0, 1); var saveResult = sforce.connection.create(newOpp); if (saveResult[0].getBoolean("success")) { newOpp[0].id = saveResult[0].id; alert("Opportunity cloned without line items"); } else { alert("Failed to create clone: " + saveResult[0]); } // Refresh the page to display the new oppportunity window.location = newOpp[0].id; } catch (err) { alert (err.description ); }

 

 
Message Edited by bg_richard on 02-05-2009 07:11 AM
I'm developing new buttons at the Opportunity Level that will clone the Opportunity with or without some related objects !

The clone works fine (at least I think this is the best way to do it )


Opportunity opp=[Select o.qtyProductGroups__c, o.Won_Lost_Comment__c, o.State__c, o.StageName, o.Selected_Contact_Id__c, o.Remarks__c, o.RecordTypeId, o.Reason_Won__c, o.Reason_Lost__c, o.Probability, o.Primary_Opportunity__c, o.Pricebook2Id, o.Personal_Chance_of_Success__c, o.OwnerId, o.Opportunity_Type__c, o.Opportunity_Description__c, o.One_Shot_Order__c, o.IsWon, o.IsDeleted, o.IsClosed,
o.I_Internal_Status__c, o.I_Account_manager__c, o.HasOpportunityLineItem, o.ForecastCategoryName, o.ForecastCategory, o.FiscalYear,
o.FiscalQuarter, o.Fiscal, o.FAS__c, o.Expire_Date__c, o.Do_not_Show_Total__c, o.Description, o.Delivery_specifications__c, o.Customer_Reference__c, o.CurrencyIsoCode, o.Contractual_Agreement__c, o.Competitor__c, o.Competitor_Products_involved__c, o.Competitor_Pricing__c, o.Competition__c, o.CloseDate, o.Categorisation__c, o.Budget__c, o.Amount, o.AccountId From Opportunity o where id=:getOpportunityId()];
if (opp.Id != null){
Opportunity newOpp = opp.clone(false,true);
newOpp.Name=opp.Name + ' CLONE';
insert newOpp;
}



As you see I need to put in there all the fields to be cloned.
The problem is : if in the future I create a new field, this one will not be transmitted with the clone ! (unless I edit the query here and add this new field) !!!!!! Is there any solution for this ?


Tkx a lot to you all for your answers and support !

Message Edited by Mig on 01-19-2009 06:49 PM
  • January 19, 2009
  • Like
  • 0
I have built VF pages to display and render our quote data to PDF format. One issue I am having is displaying the Quote Amount field. If I open up a quote that is in another currency other then my default currency the Amount fields displays something like this:
EUR 8,000.00 (USD 11,600.09)
 
This is fine in the UI but we do not want to see this on the quote. I just want to display the amount in the quote's currency. Currently my code is displaying it as seen above. Here is the code..thanks!
 
Code:
<apex:dataTable value="{!SFDC_520_Quote__c}" var="Quote" cellpadding="4" border="1" align="right">
            <apex:column value="{!Quote.Total_Charges_Calc__c}" width="100"/>
            <apex:column value="{!Quote.Quote_Amount__c}" width="126"/>
</apex:dataTable>

 
Stephanie
Hi,

I am using the OpportunityLineItem.TotalPrice field in one of my VisualForce pages with the Standard 'Opportunity' controller.  We are preparing a sort of quote document with the line items and amounts from an Opportunity.  I am using the 'outputField' tag to show this field.  Simplified version of the page code below:

Code:
<apex:dataTable value="{!opportunity.OpportunityLineItems}" var="Item" width="675" rules="all" cellPadding="6" styleClass="data" columnClasses="info_bottom_1, info_bottom_2, info_bottom_3, info_bottom_4">
            <apex:column>
                 <apex:outputField value="{!Item.TotalPrice}"/>
            </apex:column>
   </apex:dataTable>

 
Since our organization has multi-currency turned on, the values coming from the 'TotalPrice' field have the ISO code as well as the value, and do not have a Currency Symbol.  For example, this is shown as:

USD 47,250.00


However, we would like to show this value as:

$47,250.00



Is there some way to have Salesforce return the value in this format?   Can this be done across currencies ?

Or, does someone have a good suggestion for doing a sort of  'replace' function so that I can replace the ISO code with the currency symbol for our currencies??

Many thanks for any ideas.
Hi,

I am using the OpportunityLineItem.TotalPrice field in one of my VisualForce pages with the Standard 'Opportunity' controller.  We are preparing a sort of quote document with the line items and amounts from an Opportunity.  I am using the 'outputField' tag to show this field.  Simplified version of the code below:

Code:
<apex:dataTable value="{!opportunity.OpportunityLineItems}" var="Item" width="675" rules="all" cellPadding="6" styleClass="data" columnClasses="info_bottom_1, info_bottom_2, info_bottom_3, info_bottom_4">
            <apex:column>
                 <apex:outputField value="{!Item.TotalPrice}"/>
            </apex:column>
   </apex:dataTable>

 
Since our organization has multi-currency turned on, the values coming from the 'TotalPrice' field have the ISO code as well as the value, and do not have a Currency Symbol.  For example, this is shown as:

USD 47,250.00


However, we would like to show this value as:

$47,250.00



Is there some way to have Salesforce return the value in this format?   Can this be done across currencies ?

Or, does someone have a good suggestion for doing a sort of  'replace' function so that I can replace the ISO code with the currency symbol for our currencies??

Many thanks for any ideas.




I have a VF page that is displaying Quote data. On our custom quote object we have a lookup to the Contact object to store the person who is designated as the System Admin. The field is called System_Admin__c. I need to display this person's name on in a table on the page and thought I could do so by specifying:
 
Code:
<table border = "1">
            <tr>
                <td width=20%>Name:</td>
                <td width=30%>{!SFDC_520_Quote__c.System_Administrator__c}</td>
                <td width=20%>Phone:</td>
                <td width=30%><apex:outputtext value="{!SFDC_520_Quote__c.System_Administrator_Phone__c}" /></td>
            </tr>

 
but this displays the id of the contact record instead of displaying the contact's name. How do I get the Contact name to display?
I am trying to create a VisualForce page that will display Quote and Quote Line Item (both custom objects from the AppExhange application) data. Below is my code but it is erroring out with:
Error: Invalid field SFDC_520_QuoteLine__r for SObject SFDC_520_Quote__c
 
Code:
Error: Invalid field SFDC_520_QuoteLine__r for SObject SFDC_520_Quote__c  
<apex:page renderAs="pdf"
           standardcontroller="SFDC_520_Quote__c">     
        
           <p style="text-align:center; font-size: 100%;">ONESOURCE ORDER SCHEDULE</p>
           <p style="text-align: right; font-size: 80%"> Contract No: <apex:outputtext value=" {!SFDC_520_Quote__c.Contract_Number__c}" /></p> 
           <p style="text-align: left; line-height: .05; font-size: 70%"> <b>Customer Name:</b> <apex:outputtext value=" {!SFDC_520_Quote__c.Opportunity_Account_Name__c}" /></p> 
           <p style="text-align: left; line-height: .05; font-size: 70%"> <b>Customer No:</b> <apex:outputtext value=" {!SFDC_520_Quote__c.Opportunity_Account_PMD_Id__c}" /></p> 
           <p style="text-align: left; line-height: .50; font-size: 70%"> <b>Customer Subscribes to the following OneSource On-line Service(s):</b></p> 

            <apex:dataTable value="{!SFDC_520_Quote__c.SFDC_520_QuoteLine__r}" var="Product">
            <apex:facet name="caption">table caption</apex:facet>
            <apex:facet name="header">table header</apex:facet>
            <apex:facet name="footer">table footer</apex:facet>
            <apex:column footerValue="column footer" value="{!Product.Product_Code__c}"/>
            </apex:dataTable>
            
                  
                                  
  

</apex:page>

 
 
What am I missing?
<SCRIPT type=text/javascript>// var tabId = getCookie('dmTab'); var closeButtonId = 'thePage:theForm:closeButton'; if (tabId && getBottomPanelHeight() > 28) { showCloseButton(closeButtonId, true); } else { showCloseButton(closeButtonId, false); } document.getElementById('thePage:theForm:showControllerLink').style.display = (false) ? 'inline' : 'none'; // </SCRIPT>
    Hi everyone, I am fairly new to apex language.  I am trying to create a simple script that will create a new Opportunity (Renewal) if the Stage = "closed/won".  So, if an Opportunity Stage = "closed/won" create a new Opportunity, and duplicate any required fields and save the new record.  The trigger would also need to be dependent on Record Type because we have many other divisions using other Page Layouts or by Role. 

I have a hard time programming from scratch, especially on code that I have never written before.  Does anyone have examples of something like this?  Thanks


Message Edited by jk51141 on 05-06-2008 06:37 AM
Currently I use an override for my opportunity clone, this line being a subset of it.
 
var redirectURL = "{!UrlFor($Action.Opportunity.Clone,Opportunity.Id,[retURL = $Request.retURL],true)}";
Is there any way I can set it to clone with OpportunityLineItems as well?