• pandu ranga 8
  • NEWBIE
  • 0 Points
  • Member since 2022

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 0
    Questions
  • 11
    Replies
Hi Team
I have an application in Apex and Visualforce.
I would like to change an icon of my application from default HOME to my own icon.
How do I do this?
I tried installing the package "Custom Section Header Icon For VF Pages", still its not working, icon is not seen.


Thank you

We do not maintain multiple currencies and we do not wish to do that at this time. What we would like to do is to provide our users with the ability to choose a currency from a picklist dropdown (Chosen Currency) and then to have a field (Calculated Revenue) calculated and displaying the revenue amount in that chosen currency.


It seems like I would be able to do this if I just have a currency table which I can reference which is maintained.


I've been looking into currency apps to maintain a table and they all seem to be based upon the notion that my org would be setup to manage currencies, which we are not.


Are we best off setting up to manage currencies even if we do not intend to have multiple currencies used just to have a currencies table created ? 

I want to be able to customise the registration errors for when someone goes to create a community login. 

Using the Self-Register, I get this error message (It also doesn't alert the admin):

Self-Register Error

If I use the Winter '19 Configurable Self register, I get this extremely unhelpful error "Hmm. Something isn't right. Please try again.":
User-added image

  • September 25, 2018
  • Like
  • 1
I want to integrate worldpay payment process through salesforce visualforce pages.
is their any way to do this payment integration??
I am attempting to capture the last date (max) in a dataset using a filter.  This is a date field.

Sometimes we need to build a table for showing grouped records by a particular field. Here I show one way to accomplish this. 

For example, suppose we want to show all contacts grouped by company as shown in the following image.

Table of Contacts grouped by Account

In order to group cells in a html table we could use the attribute rowspan but we need to know how many records will be grouped in each Account. For this we could use a controller that allow us order and manage the records that will be shown in the Visualforce page.
 
Here is an example that I made for the visualforce and Apex Code. 

<apex:page standardController="Contact" extensions="contactsByAccount_extension" >

  <table border="1" cellspacing="0" width="60%">
    <thead>
        <th> Account </th>
        <th> Title </th>
        <th> Name </th>
        <th> Email </th>
    </thead>
       
    <apex:repeat value="{!contactsByAccount}" var="key" >
      
      <apex:repeat value="{!contactsByAccount[key].contactList}" var="keyvalue" > 
        <tr> 
           <td rowspan="{!contactsByAccount[key].numOfContacts}" style="display:{!IF(CASESAFEID(keyvalue.id)==CASESAFEID(contactsByAccount[key].firstOfList), 'table-data','none' )};"> {!keyvalue.Account.name} </td>
          <td> {!keyvalue.Title} </td>
          <td> {!keyvalue.Name} </td>
          <td> {!keyvalue.Email} </td>  
        </tr>
      </apex:repeat>
      
    </apex:repeat> 
  </table>
    
</apex:page>

In the Visualforce page we iterate through a Map that comes from the extension controller. This Map group the records by Account. So for each Account we also iterate through the contacts of that Account.

The first cell, that show the name of the Account ONLY should be displayed in the first iteration, and it's not recomended to use apex variables in an apex:repeat, so a possible solution for this is making a method in the controller that let us know if the record is the first of the list. Thus we use in the style attribute of the <td> tag a conditional for display the cell. If the record ID of the current record is equal to the first of the list then display the account name. The rest of the cells are displayed without condition. 

Let's see the extension controller now.

public class ContactsByAccount_extension {

    public ContactsByAccount_extension(ApexPages.StandardController controller) {

    }
    
    public Map<String,contactosListWrapper> getContactsByAccount(){
    
      List<Contact> result = [SELECT Account.name, Title, Name, Email FROM Contact ];
    
      // Group Contacts by Account                                
      Map<String,contactosListWrapper> contactsByAccount = new Map<String,contactosListWrapper>();
      for(Contact cont: result){
        if(null == cont.Account.name) continue;
        contactosListWrapper empresa = contactsByAccount.get(cont.Account.name);
        if(null == empresa){
            contactsByAccount.put(cont.Account.name, new contactosListWrapper(new List<contact>()) );    
        }
        contactsByAccount.get(cont.Account.name).contactList.add(cont);
      }
      
      return contactsByAccount;
    }
    
   // List of contacts and details  
   class contactosListWrapper {
       
       public List<Contact> contactList {get; set;}
       
       public Integer numOfContacts {
          get{
            return contactList.size();
          }
          set;
       }
       
       public Id firstOfList{
          get{
            return contactList[0].Id;
          }
          set;
       }
             
       public contactosListWrapper(List<contact> listContacts){
           contactList = listContacts;
           
       }

The inner class contactosListWrapper is a container of a contact list and give us information about wich is the first and how many of them are. 

The extension controller method getContactsByAccount() makes a query of all the contacts and then they are group in the map by Account. For each Account we make a new entry in the Map with the name of the Account (String) and the list of contacts (contactosListWrapper). 

I have very simple VF Page rendered as a pdf with a section where I set inline style with margins using the following code:

 

<div style="margin-left:250px; margin-top:250px;">
 <apex:panelGrid columns="1" width="100%" >                       
    
        <apex:outputText value="Some Text" id="some text"/>
                
</apex:panelGrid>
</div>

 

The margin left property worked, however the margin-top property did not.  Could someone shed some light on this?

 

Thanks!

 

Hi All,

 

I hope this is a simple problem and I'm just missing something.

 

I am trying to build a controller extension that saves a VF form page details and then reloads the same page.

 

This should be straight forward but when I try and use the documented way to do this, the data is saved and the return page is the page I wanted, but along with it the URL of the page , a long string of test has been appended to the end, the apex seems to be wanting to map the details of the fields on the page when it reloads.

 

This in itself would not a problem, but some users are getting an authentication error when the page reloads, and i assume this has something to do with it.

 

Any help would be great.

 

Thanks all

We have several Visualforce email templates defined in our managed package. Some of them reference a component in our managed package to create an attachment. All works well until, after we install the package, we try to modify the template to point to a new component in the installed org (not in the managed pkg). Then we get an error saying that it can't find the component.

 

The installed template still shows the component referenced as <c:compName/>. Both that and changing it to <namespace:compName/> reference the component in the managed package. Changing to <c:newCompName /> where newCompName is outside of the managed package gives us the afore-mentioned error. Seems like a bug to me or at least an oddity in how components are handled in managed email templates. Anyone else come across a similar issue?

  • February 11, 2011
  • Like
  • 1
Is there a work around to incorporate more than 15 steps in an approval process. Our business process is quiet complicated and requires close to 25 steps to cater to the requirements.
  • March 08, 2010
  • Like
  • 3