• b-liu
  • NEWBIE
  • 5 Points
  • Member since 2011

  • Chatter
    Feed
  • 0
    Best Answers
  • 1
    Likes Received
  • 0
    Likes Given
  • 13
    Questions
  • 12
    Replies

Hey Guys,

 

I have just moved a custom object from my sandbox to live site. After assigning a VisualForce page for NEW(Standard Buttons), when creating a new record... the visualforce page automatically comes up instead of the record type selection screen. Has anyone come accross this problem? If so is there a solution?

 

B

  • May 17, 2012
  • Like
  • 0

I'm trying to make a custom edit page for the Contact object. I'm trying to use <apex:inputField value="{!Contact.Account.name}" /> but after saving it does not save the account name. Does anyone have a solution for this?

  • March 20, 2012
  • Like
  • 0

Hey guys,

 

At the beginning of each month, I would like a set of new records for my custom object to be made. How would I go about doing this?

  • March 14, 2012
  • Like
  • 0

Hey guys,

 

I have a visualforce page that I have placed in an object's page layout(for profile permissions purposes). Now when you click on a button in related lists... like new contact, the new page opens up within the page layout space where the VF page is placed. How do I make it so that the page redirects to the propper url and not stay in the contained page layout?

 

B

  • November 15, 2011
  • Like
  • 0

Looking to recreate the buttons on the page layouts to my custom Visual Force page. How do you find the Methods in the objects standard controllers?

  • October 21, 2011
  • Like
  • 0

Hey guys,

I've been trying to create a pop-up window to show an enhanced list of accounts and contacts(but seperate locations)

 

trying to use the window.open(); method I keep running into an error that a " isnt closed or "<a>" tag needs a />. all my syntax is correct but is there a reason for this happening or an easier way with apex to get a pop-up window?

  • September 12, 2011
  • Like
  • 0

Hey guys,

 

Coming across a post I found the select list to select contacts from an account. I've been trying to make it one level up so that you can select the available accounts and display their details. Then be able to select the cooresponding contacts after to see their details.

 

VF page looks like this:

<apex:page controller="newController" tabStyle="Account">
  <apex:pageMessages id="msgs"/>
  <apex:sectionHeader title="Getting this thing to finally work" />
    <apex:form >
      <apex:pageBlock title="Contact Directory" mode="edit">
      <apex:pageBlockSection title="Account Information">
        <apex:selectList value="{!selectedAccount}" multiselect="true" style="height:400px; overflow:auto;">
            <apex:selectOptions value="{!account}"/>
         </apex:selectList><p/>
      </apex:pageBlockSection>
      <apex:pageBlockSection title="Contacts">
         <apex:selectList value="{!selectedContact}" multiselect="true" style="height:400px; overflow:auto;">
            <apex:selectOptions value="{!contact}"/>
         </apex:selectList>
      </apex:pageBlockSection>
    </apex:pageBlock>
    <apex:commandButton value="Go" action="{!test}" rerender="out, msgs" status="status"/>
  </apex:form>
  
    <apex:outputPanel id="out">
        <apex:actionstatus id="status" startText="testing...">
            <apex:facet name="stop">
                <apex:outputPanel >
                    <p>You have selected:</p>
                    <apex:dataList value="{!selectedContact}" var="sc">
                        <h3>Account ID: {!sc}</h3>
                    </apex:dataList>
                    <apex:dataList value="{!contacts}" var="c">
                        Name: {!c.name} Phone: {!c.phone} Email: {!c.email}
                    </apex:dataList>
                </apex:outputPanel>
            </apex:facet>
        </apex:actionstatus>
    </apex:outputPanel>
    
</apex:page>

 

 

Here's my controller:

public class newController {

    Account account;
    Contact contact;

    
    public String[] selectedAccount=new String[]{};
    
    public String[] getSelectedAccount()
    {
        return selectedAccount;
    }
    
    public void setSelectedAccount(String[] sel) {
        selectedAccount=sel;
    }
    
    public List<SelectOption> accountList;
    
    public List<SelectOption> getAccount () {
        if (accountList == null) {
            List<Account> accountee = [select id, name, phone, website from Account limit 100];
          
            accountList = new List<SelectOption>();
            
            for (Account a : accountee) {
                accountList.add(new SelectOption( a.id, a.name ));
            }
        }
        return accountList;
    }
    

    public String[] selectedContact=new String[]{};
    
    public String[] getSelectedContact()
    {
        return selectedContact;
    }

    public void setSelectedContact(String[] sel) {
        selectedContact=sel;
    }
    
    public List<SelectOption> contactList;
  
    public List<SelectOption> getContact () {
        if (contactList == null) {
            List<Contact> contactee = [select id, name, contact.accountid from Contact
                                        where contact.accountid = :ApexPages.currentPage().getParameters().get('id')
                                        limit 100];
          
            contactList = new List<SelectOption>();
            
            for (Contact c : contactee) {
                contactList.add(new SelectOption( c.id, c.name ));
            }
        }
        return contactList;
    }
 
    public List<Contact> contacts {get;set;}
    
    public PageReference test(){
        // blank out any earlier details
        
        account=new List<Account>();
        if (null!=selectedContact){
            account=[select id, name, phone, website from Account where id IN :selectedAccount];
        }
        
        contacts=new List<Contact>();
        if (null!=selectedContact){
            contacts=[select id, name, phone, email from Contact where id IN :selectedContact];
        }
        
        return null;
    }  
}

 I'm stuck on what to do and the controller is giving me the hardest time.

 

Thanks

  • August 17, 2011
  • Like
  • 0

I am trying to consolidate alot of the navigation clutter and navigating away from the page to look up details.

 

I have the standard enhanced account list displayed on the page. But how do I make it so that when you click the account names, it populates the account details beneath, further more, below the details have a list of the contacts associated with them.

 

Thanks Yall

B

  • August 16, 2011
  • Like
  • 0

Hey guys,

 

I have put an enhanced list in a collapsible div to minimize scrolling on a visualForce page.

 

<apex:enhancedList type="Account" height="300" rowsPerPage="25" id="AccountList" />

 

When you click on any name in the list, it directs you to the detail page. How would I take those details and displaying them on the same page so that it will populate a div below the list. Im also trying to minimize the redirecting of pages.

 

It will also help if with the enhancedList to be able to take out the chatter option and the drop down for the other views and creating views.

 

Thank yall

  • August 15, 2011
  • Like
  • 0

Hey guys,

 

I prebuilt a page with simple jquery, html, and css. The js files and css file is in my static resource. Everything seems to be working and looking exactly how it should but theres an issue with padding. Some of the divs have had their top and bottom padding removed. Is there something I'm missing here?

 

B

  • July 28, 2011
  • Like
  • 0

Hey guys,

I'm trying to make a very customize look away from the default salesForce look. Is there any way I can replace the header image to start pages look very custom look? I've tried copying the component code to the default header and I'm not having any luck approaching this goal.

 

Thanks guys

 

  • July 28, 2011
  • Like
  • 0

I have been trying to implement jQuery into my visualForce pages to create a nicer appeal with simple animations and a better view of things. I have a prebuilt website demo for the new UI but already I am having trouble getting started by having the jQuery work. I've added the jQuery standard development to my static resources. But not even the simple hide() function isnt working.

 

Can anyone know what I am doing wrong or can lead me the right direction? The tutorials and things I've tried replicating off sites have not worked.

 

 

  • July 19, 2011
  • Like
  • 0

Hey guys, I'm brand new to Apex and VisualForce.

 

I'm trying to find a way that I can build a dynamic email signature into my email template so that whoever is sending the email has his/her Name, Title, Phone, Mobile, and Email

 

I've tried this:

                   <p><font color="#CC0000">+</font> {!$User.name}<br />
                    <b>{!$User.owner.title}</b><br />
                    123 Holla Back St<br />
                     NEW YORK, NY 10014<br />
                    W: {!$User.phone}<br />
                    C: {!$User.mobile}<br />
                    {!$User.email}</p>

 

Been trying to look for another discussion board trying to make this work but unsuccessful.

  • July 01, 2011
  • Like
  • 1

Hey guys, I'm brand new to Apex and VisualForce.

 

I'm trying to find a way that I can build a dynamic email signature into my email template so that whoever is sending the email has his/her Name, Title, Phone, Mobile, and Email

 

I've tried this:

                   <p><font color="#CC0000">+</font> {!$User.name}<br />
                    <b>{!$User.owner.title}</b><br />
                    123 Holla Back St<br />
                     NEW YORK, NY 10014<br />
                    W: {!$User.phone}<br />
                    C: {!$User.mobile}<br />
                    {!$User.email}</p>

 

Been trying to look for another discussion board trying to make this work but unsuccessful.

  • July 01, 2011
  • Like
  • 1

I'm trying to make a custom edit page for the Contact object. I'm trying to use <apex:inputField value="{!Contact.Account.name}" /> but after saving it does not save the account name. Does anyone have a solution for this?

  • March 20, 2012
  • Like
  • 0

Looking to recreate the buttons on the page layouts to my custom Visual Force page. How do you find the Methods in the objects standard controllers?

  • October 21, 2011
  • Like
  • 0

I have been trying to implement jQuery into my visualForce pages to create a nicer appeal with simple animations and a better view of things. I have a prebuilt website demo for the new UI but already I am having trouble getting started by having the jQuery work. I've added the jQuery standard development to my static resources. But not even the simple hide() function isnt working.

 

Can anyone know what I am doing wrong or can lead me the right direction? The tutorials and things I've tried replicating off sites have not worked.

 

 

  • July 19, 2011
  • Like
  • 0

Hi!

 

I need some help on how to fix this Visualforce Error Message. I want to display the Open Activities and Activity History related list for a Custom Object. In its standard page, by default, this two related list is displayed but when I try to override the view page with a custom visualforce page only the custom child object related list shows.

 

Here's my code:

 

<apex:page StandardController="Object__c" extensions="ObjectExtension" showHeader="true" sidebar="true" >

    

    <apex:detail />    


    <apex:relatedList list="Object_Child__r"/>


    <apex:relatedList list="OpenActivities" />
    <apex:relatedList list="ActivityHistories"/>

</apex:page>

 

Is it something about salesforce restrictions? Like, Open Activities and Activity History were standard objects and cannot be a child of a custom object? Is there anyway I can do this right? I really need help T.T

 

Thanks!

 

Best Regards,

Pat

  • June 30, 2011
  • Like
  • 0

Hi Everyone,

 

I have the need to create a custom button on a visualforce page. I have been able to find documentation on creating a custom button that points to a visualforce page but not one that actually resides on the VF page. Since I am new to this I have no idea where to begin, the VF workbook I have does not have any info. either.

 

My button is simple, it points to another object within salesforce.com. E.g. the cases object, but needs to render below the button, to where I have multiple static buttons on the top of the VF page and can click on any button and the corresponding page populates below.

 

Thanks in advance,

V

Hi,

 

I want to display the account records and related contacts for each account record in a visual force page.

I am reach the requirement through command links that is iam displayed the accounts in visual force page and if we click on any account that will display the related contacts. but now i want to display each account record and related contacts line by line with line seperation for every account and contact record group. please any one help me how to solve these

Hi,

 

I have been reading through lots of posts, but I cannot figure out the solution to my problem.

 

I am trying to create a VF page from an account that lists all contacts associated with the account.  The user should be able to select a contact and the contact is displayed.

 

I am able to display all the contacts, but not select one.

 

VF Page:

 

 

<apex:page controller="newOpportunityController2" tabStyle="Opportunity">
  <apex:sectionHeader title="New Customer Quick Quote" subtitle="Step 1 of 3"/>
    <apex:form >
      <apex:pageBlock title="Customer Information" mode="edit">
      <apex:pageBlockSection title="Account Information">
                        
        <!-- Within a pageBlockSection, inputFields always display with their
             corresponding output label. -->  
              You are viewing the {!account.name} account. <p/>
      </apex:pageBlockSection>
      <apex:pageBlockSection title="Contacts">
         <apex:selectList value="{!selectedContact}" multiselect="true">
            <apex:selectOptions value="{!contact}"/>
         </apex:selectList>
      </apex:pageBlockSection>
    </apex:pageBlock>
  </apex:form>
  
    <apex:outputPanel id="out">
        <apex:actionstatus id="status" startText="testing...">
            <apex:facet name="stop">
                <apex:outputPanel>
                    <p>You have selected:</p>
                    <apex:dataList value="{!selectedContact}" var="c">a:{!c}</apex:dataList>
                </apex:outputPanel>
            </apex:facet>
        </apex:actionstatus>
    </apex:outputPanel>
    
</apex:page>

 

 

My Controller:

 

 

public class newOpportunityController {

   Account account;
   Contact contact;

   public Account getAccount() {
        if(account == null) account = new Account();
      return account;

   } 
    public String selectedContact {get;set;}
    
    public List<SelectOption> contactList;
    
    public List<SelectOption> getContact () {
        if (contactList == null) {
            List<Contact> contactee = [select id, name, contact.accountid from Contact where contact.accountid = :ApexPages.currentPage().getParameters().get('id')];
            
        contactList = new List<SelectOption>();
        for (Contact c : contactee) {
            contactList.add(new SelectOption( c.id, c.name ));
        }
    }
    return contactList;
    }
 
//    String[] selectedContact = new String[]{};
 
     public void setContact(String[] selectedContact) {
            this.selectedContact = selectedContact;
        }

     public String[] getSelectedContact() {
            return selectedContact;
        }
            

   
   
   

}

 

 

I am pretty sure my problem is with my gets and set, but I can't figure it out and am getting really confused and frustrated!

 

Thanks in advance for any help.

 

David

  • August 09, 2010
  • Like
  • 0

I have a custom object "Retail_Customer_Contract__c" that has child objects "Special_Discount__c" If I go into the master detail field for the relationship the "Child Relationship Name" is "Special_Discounts" but I can not get it to work. I get the follow error :

 

 'Special_Discounts' is not a valid child relationship name for entity Retail Customer Contract


 

Here is my visualForce page

 

 

<apex:page standardController="Retail_Customer_Contract__c" extensions="RetailCustomerContractExtController" ><apex:relatedList list="Special_Discounts"/></apex:page>

 

I have tried every name possible for the list="" attribute. I have tried Special_Discount__c, SpecialDiscount, SpecialDiscounts, etc

 

Any thoughts would be greatly appreciated!