• empatey
  • 0 Points
  • Member since 2009

  • Chatter
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 1
  • 1

I'm having problems firing a query in a controller class:


public class MyController3 { private final Contact contact; public MyController3() {contact = [SELECT id, name, mailingstreet, account.name, account.billingstreet FROM contact where id =:ApexPages.currentPage().getParameters().get('Id')]; } public Contact getContact() { return contact; } public PageReference save() { update contact; return null; } }


My visual force page has varied and I have tried many things.  Basically, I want the user to enter a contact and hit "save".  When the contact loads, I want the controller to send address data and account data.  Simple enough?


Here is my VF page:  I'm currently referencing MyController3, not Contact... so please ignore the first line.



<apex:page StandardController="Contact"> <apex:form > <apex:pageBlock id="in" title="Search Affiliates and Addresses for {!$User.FirstName}"> <apex:pageMessages /> <apex:pageBlockButtons > <apex:commandButton value="Search" action="{!list}" rerender="out, in" status="status"/> </apex:pageBlockButtons> <apex:pageBlockSection > <apex:inputField value="{!contact.lastname}"/> <apex:inputField value="{!contact.firstname}"/> </apex:pageBlockSection> </apex:pageBlock> </apex:form> <apex:dataTable value="{!Contact}" var="Contact" width="100%" > <apex:column > <apex:facet name="header"><b>Contact Name</b></apex:facet> {!Contact.Name} </apex:column> <apex:column > <apex:facet name="header"><b>Mailing Address</b></apex:facet> {!Contact.MailingStreet} </apex:column> <apex:column > <apex:facet name="header"><b>Account Name</b></apex:facet> {!Contact.Account.Name} </apex:column> <apex:column > <apex:facet name="header"><b>Billing Address</b></apex:facet> {!Contact.Account.BillingStreet} </apex:column> </apex:dataTable> </apex:page>

I have tried forcing the ID via param syntax in to no avail.   I have also tried several different things and now wonder if I'm up against a license issue.  Please advise either way.  Thanks!

We are creating our first VF email template and are having issues with bringing in the customer billing address.  We've followed all the rules that work with other fields but the address just won't come through.


We've tried:








Can anyone help?