You need to sign in to do that
Don't have an account?
Sascha Deinert
GetRecord Controller
Hi,
I wrote a big class with a lot of calculation, but all the calculation use the account id as inidicator.
If I open the visualforce/class it use the account id.
current: https://domain--dev--c.csXX.visual.force.com/apex/Parentanalyse?scontrolCaching=1&id=001b000000XUVdv <-- account id
Now I want to change the account id to a customfield parentanalyse_id__c. How can I use the customfield with the code below.
future: https://domain--dev--c.csXX.visual.force.com/apex/Parentanalyse?scontrolCaching=1&id=001b000000XUVdv <-- parentanalyse_id__c
Is this the correct way to get this information? If not, pleas let me know.
Thanks,
Sascha
I wrote a big class with a lot of calculation, but all the calculation use the account id as inidicator.
If I open the visualforce/class it use the account id.
current: https://domain--dev--c.csXX.visual.force.com/apex/Parentanalyse?scontrolCaching=1&id=001b000000XUVdv <-- account id
Now I want to change the account id to a customfield parentanalyse_id__c. How can I use the customfield with the code below.
future: https://domain--dev--c.csXX.visual.force.com/apex/Parentanalyse?scontrolCaching=1&id=001b000000XUVdv <-- parentanalyse_id__c
Is this the correct way to get this information? If not, pleas let me know.
public class ParentAnaylse_class { private Id KaccId {get; set;} public ParentAnaylse_class(ApexPages.StandardController stdcontroller) { KaccId = stdcontroller.getRecord().Id;
Thanks,
Sascha
Can you help me.
Thanks,
Sascha
All Answers
Remove the sandardcontroller and extension attribute from the page add controller attribute
like controller="ParentAnaylse_class"
further you can process with this id value
If I change the first line in the page from
<apex:page standardcontroller="account" extensions="Parentanalyse_class" showheader="false" sidebar="false">
to
<apex:page controller="Parentanalyse_class" showheader="false" sidebar="false">.
Now I get the error "String.Name" etc., because I need the account for some information within the page. How can I solve this?
Thanks,
Sascha
and try to use that variable inside visualforce page
Can you help me.
Thanks,
Sascha