• #27406
    Salesforce | Jos Jos #204
    Forcetalks

    My Custom Visualforce edit page does not show any values

    I have a simple edit page on a custom object with a ‘simple’ controller extension (as I need a custom save method). However .. the VF page does no show any values …. (and no error).

    Public Account MyAcc { get; set; }
    Public Account_PriceBook__c acc { get; set; }
    public Account_PriceBook__c AccPB { get; set; }
    
    //** Class constructor (Always loaded ....)
    public DEPT_AcContPcBControllerExt(ApexPages.StandardController Controller) {
    acc = (account_pricebook__c)controller.getRecord();
    String modeStr = ApexPages.currentPage().getParameters().get('Mode');
    TextDescription = '';
    
    system.debug('*** ** *** Record id'+Acc.id);
    system.debug('*** ** *** Mode'+modeStr);
    if (acc != null && acc.Id != null){
    Account_PriceBook__c AccPB = [SELECT id, Price__c,Account_Lookup__c,Description__c, AgencyLookup__c,Product_Lookup__c,marge__c from account_pricebook__c where id = :acc.id];
    system.debug('*** ** *** Account id'+AccPB.Account_Lookup__c);
    system.debug('*** ** *** Description'+AccPB.Description__c);
    MyAcc = [SELECT id,name FROM account WHERE id=: AccPB.Account_Lookup__c LIMIT 1];
    system.debug('*** ** *** Account Name'+MyAcc.Name);
    }
    } //** End of constructor
    

     

    The VF page outputfield (or input) shows no value …

    <apex:pageBlockSectionItem >
    <apex:outputLabel >Product</apex:outputLabel>
    <apex:outputField value="{!accpb.Product_Lookup__c}"/>
    </apex:pageBlockSectionItem>
    

    So … I must be overlooking something .. but what …

    Tagged: , , , ,

    #30582
    Salesforce | Charan Tej Charan Tej #36
    Forcetalks

    Did you pass id as parameter in the visualforce page.

    /apex/Your_page_name?id=Record ID you want to see in edit mode

Viewing 2 posts - 1 through 2 (of 2 total)

Please to reply to this topic.

CONTACT US

We're not around right now. But you can send us an email and we'll get back to you, asap.

Sending

About Us

Forcetalks is a Salesforce collaboration platform for coders & developers, geeks & nerds, consultants & business heads, admins & architects, managers & marketers and of course the business owners. A community where you can learn from, where you can contribute to. For you. For Salesforce. Read More...

Copyright 2018 Forcetalks. All Right Reserved.

Log in with your credentials

or    

Forgot your details?