You need to sign in to do that
Don't have an account?
jcald
How do I reference a custom number field from an Account in Apex?
How do I reference a custom field from an Account in Apex?
I am trying to reference a custom field (Account) from an apex code in a VF Opportunity page. I've tried using a lookup relationship both way (Account to Opportunity) (Opportunity to Account) and it is saying "Error: Incorrect pararmeter......Expected Number, recieved Text"
my apex code:
<Apex:outputtext value="{!1.04*Opportunity.Amount__c*Opportunity.Factor_Rate__c} " />
Opportunity.Factor_Rate__c is related to a custom field in Account. Please help . Thanks
I am trying to reference a custom field (Account) from an apex code in a VF Opportunity page. I've tried using a lookup relationship both way (Account to Opportunity) (Opportunity to Account) and it is saying "Error: Incorrect pararmeter......Expected Number, recieved Text"
my apex code:
<Apex:outputtext value="{!1.04*Opportunity.Amount__c*Opportunity.Factor_Rate__c} " />
Opportunity.Factor_Rate__c is related to a custom field in Account. Please help . Thanks
I've used Account.Factor_Rate__c (number) in replacement of Opportunity.Opp_Factor_Rate__c and included <apex:page standardController="Opportunity" extensions="Account">. This is giving me an error: Unknown property 'OpportunityStandardController.Account'
Thanks for the help.
<Apex:outputtext value="{!1.04*Opportunity.Amount__c*Opportunity.Opp_Factor_Rate__r.Factor_Rate__c} " />
What I'm doing here is following the reference to the associated account (via the __r notation) and then accessing a field from that account.
I appreicate the help. Thanks!
<thead>
<tr>
<th style="font-size: 12px" bgcolor="#202d79">24 Months</th>
<th style="font-size: 12px"><font color="#000">
<apex:outputtext value="{!1.04*Opportunity.Finance_Amount__c*Opportunity.Acct_Factor_Rate__r.Factor_Rate__c}"/>
</font></th>
<th>empty</th>
</tr>
</thead>
Is there a way to reference an account through apex attributes?
public class MyAcctController {
public Account__c accountid{ get; private set;
}
public MyAcctController(ApexPages.StandardController) {
accountid = (Account__c).getRecord();
}
public PageReference save() {
accountid.Account__c = '001i000000UP1gF;
}
}
<apex:page standardController="Opportunity" extensions="MyAcctController">
<apex:pageblock>
<apex:outputtext value="{!1.04**Opportunity.Amount__c*Account__c.Factor_Rate__c}"/>
</apex:pageblock>
</apex:page>