• Matthew Allen
  • NEWBIE
  • 75 Points
  • Member since 2014

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 21
    Questions
  • 39
    Replies
Hi All,

We are still on Classic (Lightning coming soon ish...) and have a URL hack button. I need to try and add some validation to it so that users can only press the button if a certain field is true?

Below is my basic URL hack, I just need it to only be clickable if Opportunity stage = New.

Can anyone help? My understanding is it needs to be a Java Script button but I am struggling.
 
/a2e/e?


CF00N1l000001WseX={! Opportunity.Name }&
CF00N1l000001WseX_lkid={! Opportunity.Id }&


retURL={!Opportunity.Id}

 
Hi,

Below is my VF page, but it isn;t available to me to direct a Detail Page button to it - can anyone help as to why?
 
<apex:page standardController="Custom_Object__c" recordSetVar="Opportunities" showHeader="false" sidebar="false">
   <apex:sectionHeader title="eVA Qualification Form Edit" subtitle="New eVA Qualification Form"/>

    <apex:form>
        <apex:pageBlock title="eVA Qualification Form Edit" mode="edit">
             <apex:pageBlockButtons location="bottom">
                <apex:commandButton value="Save" action="{!save}"/>
                <apex:commandButton value="Cancel" action="{!cancel}"/>
             </apex:pageBlockButtons>
                        
            <apex:pageBlockSection title="Information" columns="2">
                <apex:inputField value="{!Custom_Object__c.Opportunity__c}" required="true"/>
                <apex:inputField value="{!Custom_Object__c.OwnerId}" required="false"/>
                <apex:pageBlockSectionItem/>
                <apex:pageBlockSectionItem/>
                <apex:inputField value="{!Custom_Object__c.Website_URL__c}" required="true"/>
                <apex:inputField value="{!Custom_Object__c.Website_Visits_per_Month__c}" required="true"/>
                <apex:inputField value="{!Custom_Object__c.Existing_SAV_User__c}" required="true"/>
                <apex:pageBlockSectionItem/>
                <apex:inputField value="{!Custom_Object__c.Stock_Level__c}" required="true"/>
                <apex:pageBlockSectionItem/>
                <apex:inputField value="{!Custom_Object__c.Sales_per_Month__c}" required="true"/>
                <apex:inputField value="{!Custom_Object__c.Part_Exchange__c}" required="true"/>
                <apex:inputField value="{!Custom_Object__c.Number_of_Part_Ex_valuations_per_Month__c}" required="true"/>
                <apex:inputField value="{!Custom_Object__c.How_do_they_know_this__c}" required="false"/>
                <apex:inputField value="{!Custom_Object__c.Do_they_have_a_valuation_CAP_license__c}" required="true"/>
                <apex:pageBlockSectionItem/>
                <apex:inputField value="{!Custom_Object__c.What_are_thier_Business_objectives__c}" required="false"/>
                <apex:pageBlockSectionItem/>
                <apex:inputField value="{!Custom_Object__c.Consumer_Journey_thoughts__c}" required="false"/>
                <apex:pageBlockSectionItem/>
                <apex:inputField value="{!Custom_Object__c.Additional_Information__c}" required="false"/>
                <apex:pageBlockSectionItem/>
            </apex:pageBlockSection>            
            
            <apex:pageBlockSection title="System Information" columns="2">
                <apex:inputField value="{!Custom_Object__c.Name}" required="false"/>
                <apex:pageBlockSectionItem/>
            </apex:pageBlockSection>            
            
        </apex:pageBlock>
    </apex:form>
   

</apex:page>

 
Hi,

I have the below code. Could someone help me change it so that the colour of the banner changes based on the days_since_update_2__c field please? ideally something like, >60 Red, >30 Amber else Green.

I know it's a lot to ask but hopefully you can help.

Matt
 
<apex:page standardController="Group_Relationship__c" >
<div id='MyCustomHeaderBanner' style='width: 100%; float: left;'></div>
<script>
         window.onload = function() {
                    var myBannerHTML = "<div style='background-color: lightgrey; width: 100%; float: Centre;font-family:calibri;font-size:16px;color:black;text-align:center;'>  Action plan last updated by &nbsp{!Group_Relationship__c.Last_Update_By__c} {!Group_Relationship__c.Days_since_update_2__c} </div>";
                     document.getElementById("MyCustomHeaderBanner").innerHTML = myBannerHTML;
         };
         
         
</script>

</apex:page>

 
Hi,

I have some visualforce code that I noticed was returning some strange formatting. I think it's becuase I am referencing some number and currency fields as text so it was coming back as 0.0 instead of 0. It also had no £ at the beginning.
I have looked at trying to edit this myself but have had no luck.

Can you help?
 
<apex:outputText label="AccNAme" value="{!IF(Field1 = "Group",Field2,Field3)}" /></apex:outputLabel>
Thank you

Matt
 
Hi,

I have the below piece of code which is returning a Syntax error of 'Missing )'

All looks ok to me??

<td style="width:20%"><apex:outputLabel style="vertical-align:top; text-align:center;font-family:calibri;font-size:35px;color:{!IF(Field1 >0, '#004489', '#d9d9d9')};"><apex:outputField label="AccNAme" value="{!IF(Field2 = "Group", Field3 , Field4)}" /></apex:outputLabel></td>

Any ideas?
Hi,

I have spome basic code that many of you have already helped me with, which splits detail and related lists onto seperate tabs.

I hvae an activity related list, which is a lookup related list. Is it possible to split out Tasks and Events into seperate related lists? If so, how? and can they be sorted?

The code I am using is below. Objectives is the customer lookup related list.
 
<apex:page standardController="Group_Relationship__c" > 

<style>
      .activeTab {color:#fff; background-color: white; font-size:16px; 
         background-image:none}
      .inactiveTab { background-color: lightgrey; font-size:12px; color:black;
         background-image:none}
      .background { background-color: white; font-size:12px; color:black}
  </style>
 

        <apex:pageBlock title="Action Plan" mode="maindetail">
             <apex:tabPanel switchType="client" selectedTab="tabdetails" id="AccountTabPanel" tabClass="activeTab" inactiveTabClass="inactiveTab" contentClass="background"> 
                <apex:tab label="Details" LabelWidth="250">
                <apex:detail relatedList="false"/>
                    
                </apex:tab>
                <apex:tab label="Objectives and Meetings" LabelWidth="250">        
                 <apex:relatedList list="Objectives__r"/>    
                </apex:tab>
                <apex:tab label="Key Opportunities" LabelWidth="250">        
                <apex:relatedList list="KeyOpportunities__r"/>   
                </apex:tab>
                <apex:tab label="Key Threats" LabelWidth="250">        
                <apex:relatedList list="KeyThreats__r"/>    
                </apex:tab>
            </apex:tabPanel>
        </apex:pageBlock>
</apex:page>
Thanks you

Matt
 
Hi,

I am using this very basic code for a VF page. All i want to do is change the colour of the pageblocksection colapsable bars. Can you help?

i have read all sorts of strange ways of doing it, but hoped there was something more straght forward.
 
<apex:pageBlockSection  title="{!Group_Relationship__c.Group_Name_AP__c} Action Plan" columns="4">  
                      
            <div style="float:left; width: 100%;" >
            <apex:pageBlockSection title="Details" columns="4">
                <apex:inputField value="{!Group_Relationship__c.Group_Name__c}" required="false"/>
                
                
                
                </apex:pageBlockSection> 
                     
            </div>

 
Hi,

I am working on a VF page with a few tabs across the top. I have got this to work, however when I use a VF page within a tab, the tabs then get in am mess and huge gaps appear between each tab?? any ideas what could effect that? Remove the VF tab and everything gets close together again.

Here is my code
 
<apex:page standardController="Group_Relationship__c" showHeader="true">
  

    <apex:pageBlock title="Action Plan">
    <apex:tabPanel switchType="client">
   
    
    
    
    <apex:tab label="Details" LabelWidth="200">
    <apex:form >
   
            
            
            <div style="float:left; width: 25%;" >
            <apex:pageBlockSection title="Details" columns="1">
                <apex:inputField value="{!Group_Relationship__c.Group_Name__c}" required="false"/>
                
                </apex:pageBlockSection>            
            </div>
            
            <div style="float:left; width: 25%;" >
            <apex:pageBlockSection title="" columns="1">
               
                <apex:inputField value="{!Group_Relationship__c.Business_Area__c}" required="false"/>
                
                </apex:pageBlockSection>            
            </div>
            
            <div style="float:left; width: 25%;" >
            <apex:pageBlockSection title="" columns="1">
               
                <apex:inputField value="{!Group_Relationship__c.Current_RAG_Status__c}" required="false"/>
               
                </apex:pageBlockSection>            
            </div>
            
            <div style="float:left; width: 25%;" >
            <apex:pageBlockSection title="" columns="1">
               
                <apex:inputField value="{!Group_Relationship__c.Comments__c}" required="false"/>
                </apex:pageBlockSection>            
            </div>
            
            <div style="float:left; width: 33.1%; margin-right: 5px;" >
                <apex:pageBlockSection title="Internal" columns="2">
                <apex:inputField value="{!Group_Relationship__c.Executive_Sponsor__c}" required="false"/>
                <apex:inputField value="{!Group_Relationship__c.Relationship_Owner__c}" required="false"/>
                </apex:pageBlockSection>            
            </div>
            
            <div style="float:left; width: 33.1%; margin-right: 5px;" >
                <apex:pageBlockSection title="External" columns="2">
                <apex:inputField value="{!Group_Relationship__c.Decision_Maker_1__c}" required="false"/>
                <apex:inputField value="{!Group_Relationship__c.Decision_Maker_2__c}" required="false"/>
                </apex:pageBlockSection>            
            </div>
            
            <div style="float:left; width: 33.2%">
                <apex:pageBlockSection title="Finance" columns="2">
                <apex:inputField value="{!Group_Relationship__c.Volume_Budget__c}" required="false"/>
                <apex:inputField value="{!Group_Relationship__c.Volume_Forecast__c}" required="false"/>
                </apex:pageBlockSection>            
            </div>
            
            <div style="float:left; width: 50%">
            <apex:pageBlockSection title="Market Share" columns="2">
                <apex:inputField value="{!Group_Relationship__c.Fleet_Size__c}" required="false"/>
                <apex:inputField value="{!Group_Relationship__c.Manheim__c}" required="false"/>
                <apex:inputField value="{!Group_Relationship__c.BCA__c}" required="false"/>
                <apex:inputField value="{!Group_Relationship__c.Aston_Barclay__c}" required="false"/>
            </apex:pageBlockSection>        
            </div>
              
  

            
             </apex:form>
             </apex:tab>
             

             <apex:tab label="Group Footprint">
             <apex:include pageName="Group_Footprint_AP"/>
             </apex:tab>
             
   
             <apex:tab label="Objectives and Meetings" LabelWidth="200">        
             <apex:relatedList list="Objectives__r"/>
             </apex:tab>
             
             <apex:tab label="Key Opportunities" LabelWidth="200">        
             <apex:relatedList list="KeyOpportunities__r"/>
             </apex:tab>
             
             <apex:tab label="Key Threats" LabelWidth="200">        
             <apex:relatedList list="KeyThreats__r"/>
             </apex:tab>
             
             
             </apex:tabPanel>

    </apex:pageBlock>
   
    
</apex:page>

 
I can see this has been asked a lot, but the answers given aren't helping me change my code to work, so I am really hoping someone can do it for me?

Code below, I just need the background being white. Thanks you!
 
<apex:page standardController="Group_Relationship__c" >
<head>
<style>

tr {
    display: block;
    border-bottom: 1px solid #e6e6e6;
}
td {
    padding-left: 40px;
}
table{
    min-width: 1350px;
    }
</style>
</head>


<apex:form >
<table width="100%"> 
  <tr>
    <td style="width:10%"><apex:image id="ManheimRemarketingBuyer" value="{!If(Group_Relationship__c.Group_Name__r.Group_Buyer_RMA_Count_Form__c >0, $Resource.Remarketing_Buyer_Colour, $Resource.Remarketing_Buyer_BW)}" width="200" height="80"/></td>
    <td style="width:10%"><apex:image url="https://c.eu10.visual.force.com/resource/1513853142000/VolumeBoughtYTDPrevYear2" width="175" height="70"/></td>
    <td style="width:20%"><apex:outputLabel style="vertical-align:top; text-align:center;font-family:calibri;font-size:35px;color:{!IF(Group_Relationship__c.Group_Name__r.Group_Buyer_RMA_Count_Form__c >0, '#004489', '#d9d9d9')};"><apex:outputField label="AccNAme" value="{!Group_Relationship__c.Group_Name__r.Remarketing_Buyer_Volume_Group_Join__c}" /></apex:outputLabel></td>
    
    <td style="width:10%"><apex:image id="DealerAuction" value="{!If(Group_Relationship__c.Group_Name__r.Dealer_Auction_Volume_Group_Form__c >0, $Resource.DealerAuctionImage, $Resource.DealerAuctionImageBW)}" width="200" height="80"/></td>
    <td style="width:10%"><apex:image url="https://c.eu10.visual.force.com/resource/1513853196000/VolumeSoldYTDPrevYear" width="175" height="70"/></td>
    <td style="width:20%"><apex:outputLabel style="vertical-align:top; text-align:center;font-family:calibri;font-size:35px;color:{!IF(Group_Relationship__c.Group_Name__r.Dealer_Auction_Volume_Group_Form__c >0, '#25488e', '#d9d9d9')};"><apex:outputField label="AccNAme" value="{!Group_Relationship__c.Group_Name__r.Dealer_Auction_Volume_Group_Form__c}" /></apex:outputLabel></td>
  </tr>
  <tr>
    <td style="width:10%"><apex:image id="ManheimRemarketingVendor" value="{!If(Group_Relationship__c.Group_Name__r.Group_Vendor_RMA_Count_Form__c >0, $Resource.Remarketing_Vendor_Colour, $Resource.Remarketing_Vendor_BW)}" width="200" height="80"/></td>
    <td style="width:10%"><apex:image url="https://c.eu10.visual.force.com/resource/1513853196000/VolumeSoldYTDPrevYear2" width="175" height="70"/></td>
    <td style="width:20%"><apex:outputLabel style="vertical-align:top; text-align:center;font-family:calibri;font-size:35px;color:{!IF(Group_Relationship__c.Group_Name__r.Group_Vendor_RMA_Count_Form__c >0, '#004489', '#d9d9d9')};"><apex:outputField label="AccNAme" value="{!Group_Relationship__c.Group_Name__r.Remarketing_Vendor_Volume_Group_Join__c}" /></apex:outputLabel></td>
    
    <td style="width:10%"><apex:image id="Motors" value="{!If(Group_Relationship__c.Group_Name__r.Motors_co_uk_Accounts_Group_Form__c >0, $Resource.MotorsImage, $Resource.MotorsImageBW)}" width="200" height="80"/></td>
    <td style="width:10%"><apex:image url="https://c.eu10.visual.force.com/resource/1513853893000/RevenueRolling12" width="175" height="70"/></td>
    <td style="width:20%"><apex:outputLabel style="vertical-align:top; text-align:center;font-family:calibri;font-size:35px;color:{!IF(Group_Relationship__c.Group_Name__r.Motors_co_uk_Accounts_Group_Form__c >0, '#3BB97C', '#d9d9d9')};"><apex:outputField label="AccNAme" value="{!Group_Relationship__c.Group_Name__r.Motors_co_uk_Revenue_Group_Form__c}" /></apex:outputLabel></td>
  </tr>
  <tr>
    <td style="width:10%"><apex:image id="Modix" value="{!If(Group_Relationship__c.Group_Name__r.Modix_Accounts_Group_Form__c >0, $Resource.ModixImage, $Resource.ModixImageBW)}" width="200" height="80"/></td>
    <td style="width:10%"><apex:image url="https://c.eu10.visual.force.com/resource/1513853893000/RevenueRolling12" width="175" height="70"/></td>
    <td style="width:20%"><apex:outputLabel style="vertical-align:top; text-align:center;font-family:calibri;font-size:35px;color:{!IF(Group_Relationship__c.Group_Name__r.Modix_Accounts_Group_Form__c >0, '#FD4F00 ', '#d9d9d9')};"><apex:outputField label="AccNAme" value="{!Group_Relationship__c.Group_Name__r.Modix_Revenue_Group_Form__c}" /></apex:outputLabel></td>
    
    <td style="width:10%"><apex:image id="NextGear" value="{!If(Group_Relationship__c.Group_Name__r.Next_Gear_Accounts_Group_Form__c = 'Live', $Resource.NextGearImage, $Resource.NextGearImageBW)}" width="200" height="80"/></td>
    <td style="width:10%"><apex:image url="https://c.eu10.visual.force.com/resource/1513853383000/StatusPaint" width="175" height="70"/></td>
    <td style="width:20%"><apex:outputLabel style="vertical-align:top; text-align:center;font-family:calibri;font-size:35px;color:{!IF(Group_Relationship__c.Group_Name__r.Next_Gear_Accounts_Group_Form__c = 'Live', '#25488e', '#d9d9d9')};"><apex:outputField label="AccNAme" value="{!Group_Relationship__c.Group_Name__r.Next_Gear_Accounts_Group_Form__c}" /></apex:outputLabel></td>
  </tr>
  <tr>
    <td style="width:10%"><apex:image id="Closit" value="{!If(Group_Relationship__c.Group_Name__r.Lead_Management_Accounts_Group_Form__c >0, $Resource.IncadeaSalesColour, $Resource.IncadeaSalesBW)}" width="200" height="80"/></td>
    <td style="width:10%"><apex:image url="https://c.eu10.visual.force.com/resource/1513853893000/RevenueRolling12" width="175" height="70"/></td>
    <td style="width:20%"><apex:outputLabel style="vertical-align:top; text-align:center;font-family:calibri;font-size:35px;color:{!IF(Group_Relationship__c.Group_Name__r.Lead_Management_Accounts_Group_Form__c >0, '#FFA000', '#d9d9d9')};"><apex:outputField label="AccNAme" value="{!Group_Relationship__c.Group_Name__r.Lead_Management_Revenue_Group_Form__c}" /></apex:outputLabel></td>
    
    <td style="width:10%"><apex:image id="RMS" value="{!If(Group_Relationship__c.Group_Name__r.RMS_Accounts_Group_Form__c = 'Live', $Resource.RMSImage, $Resource.RMSImageBW)}" width="200" height="80"/></td>
    <td style="width:10%"><apex:image url="https://c.eu10.visual.force.com/resource/1513853196000/VolumeSoldYTDPrevYear2" width="175" height="70"/></td>
    <td style="width:20%"><apex:outputLabel style="vertical-align:top; text-align:center;font-family:calibri;font-size:35px;color:{!IF(Group_Relationship__c.Group_Name__r.RMS_Accounts_Group_Form__c = 'Live', '#205EAA', '#d9d9d9')};"><apex:outputField label="AccNAme" value="{!Group_Relationship__c.Group_Name__r.RMS_Volume_Sold_Group_Join__c}" /></apex:outputLabel></td>
  </tr>
  <tr>
    <td style="width:10%"><apex:image id="Xtime" value="{!If(Group_Relationship__c.Group_Name__r.XTime_Accounts_Group_Form__c >0, $Resource.IncadeaServiceColour, $Resource.IncadeaServiceBW)}" width="200" height="80"/></td>
    <td style="width:10%"><apex:image url="https://c.eu10.visual.force.com/resource/1513853893000/RevenueRolling12" width="175" height="70"/></td>
    <td style="width:20%"><apex:outputLabel style="vertical-align:top; text-align:center;font-family:calibri;font-size:35px;color:{!IF(Group_Relationship__c.Group_Name__r.XTime_Accounts_Group_Form__c >0, '#FFA000', '#d9d9d9')};"><apex:outputField label="AccNAme" value="{!Group_Relationship__c.Group_Name__r.XTime_Revenue_Group_Form__c}" /></apex:outputLabel></td>
    
    <td style="width:10%"><apex:image id="Movex" value="{!If(Group_Relationship__c.Group_Name__r.Movex_Accounts_Group_Form__c = 'Live', $Resource.Movex_Colour, $Resource.Movex_BW)}" width="200" height="80"/></td>
    <td style="width:10%"><apex:image url="https://c.eu10.visual.force.com/resource/1513853383000/StatusPaint" width="175" height="70"/></td>
    <td style="width:20%"><apex:outputLabel style="vertical-align:top; text-align:center;font-family:calibri;font-size:35px;color:{!IF(Group_Relationship__c.Group_Name__r.Movex_Accounts_Group_Form__c = 'Live', '#0076A6', '#d9d9d9')};"><apex:outputField label="AccNAme" value="{!Group_Relationship__c.Group_Name__r.Movex_Accounts_Group_Form__c}" /></apex:outputLabel></td>
  </tr>
</table>






</apex:form>
</apex:page>

 
Hi,
I have a formula that shows images based on whether certain text is found in a text field. The problem I have is that there are about 30 different images needed and doing it as a formula field exceeds the formula size limit.

Can someone help me replicate this as a visualforce page?

The formula below just shows 3 brands, but if I can get this to work, I can then rework the code to include the others

IF(
CONTAINS( Brand_Concat_Group__c ,"Audi"),
IMAGE("https://c.eu10.visual.force.com/resource/1521024589000/AUDI", "Audi", 80, 100),
null
) & " " &
IF(
CONTAINS(Brand_Concat_Group__c,"BMW"),
IMAGE("https://c.eu10.visual.force.com/resource/1521024614000/BMW", "BMW",80,100),
null
) & " " &
IF(
CONTAINS(Brand_Concat_Group__c,"Fiat"),
IMAGE("https://c.eu10.visual.force.com/resource/1521024641000/FIAT", "Fiat",80,80),
null
)

Thank you

Matt
Hi,

i need your help.  I have a field on the account object called “Brands__c” this field can contain multiple brands split by a comma. However this field can contain duplicate brands, for example Sprite, Coca Cola, Fanta, Sprite. I need s trigger that either fixes that field and remove the duplicate sprite or moves the data to another field and removes the duplicate sprite in the process.

it won’t always be sprite and the field could contain 1 brand or 50 brands.

can anyone help? I have never used triggers before but understand this is my only option.

thank you

matt
Hi,

I am using the below very basic VF code.

I would like to add a banner at the top and bottom in a colour of my choice that also included a reference to a field, for example Account.Name.

I would also like to change to the background colour to a colour of my choice.

Is this possible?



<apex:page standardController="Account" sidebar="false" showheader="false" readOnly="true" >

<apex:form >
<table width="100%">

  <tr>
        <td style="width:40%"><apex:outputLabel style="vertical-align:middle; text-align:center;font-family:calibri;font-size:50px;color:#004489;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
        <apex:outputField label="AccNAme" value="{!Account.Group_View_Account_Name__c}" /></apex:outputLabel></td>        
</tr>
<tr>
        <td style="width:40%"><apex:outputLabel style="vertical-align:top; text-align:centre;font-family:calibri;font-size:20px;color:#ffcc00;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
        <apex:outputField label="AccNAme" value="{!Account.Powered_by_Salesforce_com__c}" /></apex:outputLabel></td>
</tr>  
</table>
</apex:form>

<apex:detail relatedList="false"/>
<apex:relatedList list="Group_Relationships__r"/>
<apex:relatedList list="Activities__r"/>
<apex:relatedList list="Opportunities1__r"/>
<apex:relatedList list="Threats1__r"/>
<apex:relatedList list="Cases__r"/>



</apex:page>

 
In our business, there is a large need for "one page" summaries that head of businesses and CEO's can look at before seeing customers.

I have built some custom lookups so that all the child data also pins itself to the parent account, but it's still not pretty enough and probably contains too much data.

I don't have the skill set to make this myself, peven with help at this moment unless its a copy and paste funtion! Is there somewhere I can post small jobs like this for people to apply for?

Its bascially a summay of Account and related list data that can be printed to PDF or emailed to someone.

Thanks

Matt
Hi,

I have a Javescript button that basically just ticks a box that in turn triggers a Process Builder to update a date field with todays date and a text field withthe Users name. This works on a contact by contact basis on the contact page...

I have created a list view button using the same code so that multiple contacts could get edited with the same date and user stamp, however it doesn't work..

The code I am using is this

{!requireScript("/soap/ajax/32.0/connection.js")}
alert("Details Correct Stamp in Process");
var update_Contact = new sforce.SObject("Contact");
update_Contact.Id = "{!Contact.Id}";
update_Contact.Details_Correct_No_Change__c = true;
sforce.connection.update([update_Contact]);

alert("Contact Stamped - Thank you");
window.location.reload();

Very basic, but am I missing some extra code to get it to work for multiple contacts at a time?

Thanks

Matt
Hi,

Our org uses lightning connect to retireve data from another org. Using a matching ID I can show the external objects as related lists on a standard account page, however I need to show these objects on a Visualforce page? Can I do this?

My VF code is below, the external object API name is MAccount__x. Can anyone help me? If I make detail relatedList="True" then it does show, but I need it on another tab.

<apex:page standardController="Account" showHeader="true"
      tabStyle="account" >
   <style>
      .activeTab {background-color: #236FBD; color:white;
         background-image:none}
      .inactiveTab { background-color: lightgrey; color:black;
         background-image:none}
   </style>
   
   <apex:tabPanel switchType="client" selectedTab="tabdetails"
                  id="AccountTabPanel" tabClass="activeTab"
                  inactiveTabClass="inactiveTab">   
      <apex:tab label="Details" name="AccDetails" id="tabdetails">
         <apex:detail relatedList="False" title="true"/>
      </apex:tab>
      
      <apex:tab label="Business Area 1" name="BA1">
         <apex:relatedList subject="{!account}" list="contacts" />
         <apex:relatedList subject="{!account}" list="opportunities" />
      </apex:tab>
      
      <apex:tab label="Business Area 2" name="BA2">
         <apex:relatedList subject="{!account}" list="MAccounts__x" />
 
      </apex:tab>
      
</apex:tabPanel>
</apex:page>
Hi,

I need help and I am not sure on the best way to do it, or if it's even possible...

My Accounts have a 3 tier hierarchy, lets call it Grand Parent, Parent and Child. I have created a workflow that populates a lookup field on the Child record with the Grand Parent account. Then across numerous objects I have populated a lookup field with the same. This is so when you view the Grand Parent record, you can view all the child records against it on one page, Fantastic!! It works really well up until the point when the Parent may change.... If you were to move the Parent to a different Grand Parent account, becuase all the lookup fields are hard coded and require an edit on them all to change them, they all remain against the old Grand Parent record.

Is there anyway that when the Parent is changed, all the lookup fields in the child records can update to reflect the new Grand Parent?

urgent help needed!

Thanks

Matt
Hi,

I want to add a Visualforce section to an account page that is 5 rows high and 4 columns wide and all it needs to do is pull in the 20 fields needed.

          Field Name                      Field Name                                                        Field Name                     Field Name
          Field Name                      Field Name                                                        Field Name                     Field Name
          Field Name                      Field Name                                                        Field Name                     Field Name
          Field Name                      Field Name                                                        Field Name                     Field Name
          Field Name                      Field Name                                                        Field Name                     Field Name

Can you help write this for me? I feel it should be really easy, but I am really struggling to understand it all.

Thanks

Matt
Hi,

I want to be able to populate a custom Case field with the data held in 'Assigned To' when you submt for approval.

So, when I press 'Submit for Approval' it is assigned to a User or a queue. I want a trigger that puts that info into a custom text field so that I can create a Cases list from it to see what is in a person 'waiting for approval' queue.

Is that possible?

Thanks

Matt
Hi,

Our New Business Manager wants to be aboe to allocate Accounts to his Sales Team so they can try and win business from them.

I thought the best way to do this is some custom button on the Account list view so that he can tick a few accounts, then click this custom button that then creates a New Opportunity on all accounts and assigns them to the Sales person of his choice.

Is this even possible?

I know I can do it via dataloader but would rather they managed this themselves.

Thanks

Matt
Hi,

Could someone tell me how to create a popup alert everytime someone views an Account where the Status is = Closed please?

Thanks

Matt
Hi All,

We are still on Classic (Lightning coming soon ish...) and have a URL hack button. I need to try and add some validation to it so that users can only press the button if a certain field is true?

Below is my basic URL hack, I just need it to only be clickable if Opportunity stage = New.

Can anyone help? My understanding is it needs to be a Java Script button but I am struggling.
 
/a2e/e?


CF00N1l000001WseX={! Opportunity.Name }&
CF00N1l000001WseX_lkid={! Opportunity.Id }&


retURL={!Opportunity.Id}

 
Hi,

Below is my VF page, but it isn;t available to me to direct a Detail Page button to it - can anyone help as to why?
 
<apex:page standardController="Custom_Object__c" recordSetVar="Opportunities" showHeader="false" sidebar="false">
   <apex:sectionHeader title="eVA Qualification Form Edit" subtitle="New eVA Qualification Form"/>

    <apex:form>
        <apex:pageBlock title="eVA Qualification Form Edit" mode="edit">
             <apex:pageBlockButtons location="bottom">
                <apex:commandButton value="Save" action="{!save}"/>
                <apex:commandButton value="Cancel" action="{!cancel}"/>
             </apex:pageBlockButtons>
                        
            <apex:pageBlockSection title="Information" columns="2">
                <apex:inputField value="{!Custom_Object__c.Opportunity__c}" required="true"/>
                <apex:inputField value="{!Custom_Object__c.OwnerId}" required="false"/>
                <apex:pageBlockSectionItem/>
                <apex:pageBlockSectionItem/>
                <apex:inputField value="{!Custom_Object__c.Website_URL__c}" required="true"/>
                <apex:inputField value="{!Custom_Object__c.Website_Visits_per_Month__c}" required="true"/>
                <apex:inputField value="{!Custom_Object__c.Existing_SAV_User__c}" required="true"/>
                <apex:pageBlockSectionItem/>
                <apex:inputField value="{!Custom_Object__c.Stock_Level__c}" required="true"/>
                <apex:pageBlockSectionItem/>
                <apex:inputField value="{!Custom_Object__c.Sales_per_Month__c}" required="true"/>
                <apex:inputField value="{!Custom_Object__c.Part_Exchange__c}" required="true"/>
                <apex:inputField value="{!Custom_Object__c.Number_of_Part_Ex_valuations_per_Month__c}" required="true"/>
                <apex:inputField value="{!Custom_Object__c.How_do_they_know_this__c}" required="false"/>
                <apex:inputField value="{!Custom_Object__c.Do_they_have_a_valuation_CAP_license__c}" required="true"/>
                <apex:pageBlockSectionItem/>
                <apex:inputField value="{!Custom_Object__c.What_are_thier_Business_objectives__c}" required="false"/>
                <apex:pageBlockSectionItem/>
                <apex:inputField value="{!Custom_Object__c.Consumer_Journey_thoughts__c}" required="false"/>
                <apex:pageBlockSectionItem/>
                <apex:inputField value="{!Custom_Object__c.Additional_Information__c}" required="false"/>
                <apex:pageBlockSectionItem/>
            </apex:pageBlockSection>            
            
            <apex:pageBlockSection title="System Information" columns="2">
                <apex:inputField value="{!Custom_Object__c.Name}" required="false"/>
                <apex:pageBlockSectionItem/>
            </apex:pageBlockSection>            
            
        </apex:pageBlock>
    </apex:form>
   

</apex:page>

 
Hi,

I have the below code. Could someone help me change it so that the colour of the banner changes based on the days_since_update_2__c field please? ideally something like, >60 Red, >30 Amber else Green.

I know it's a lot to ask but hopefully you can help.

Matt
 
<apex:page standardController="Group_Relationship__c" >
<div id='MyCustomHeaderBanner' style='width: 100%; float: left;'></div>
<script>
         window.onload = function() {
                    var myBannerHTML = "<div style='background-color: lightgrey; width: 100%; float: Centre;font-family:calibri;font-size:16px;color:black;text-align:center;'>  Action plan last updated by &nbsp{!Group_Relationship__c.Last_Update_By__c} {!Group_Relationship__c.Days_since_update_2__c} </div>";
                     document.getElementById("MyCustomHeaderBanner").innerHTML = myBannerHTML;
         };
         
         
</script>

</apex:page>

 
Hi,

I have some visualforce code that I noticed was returning some strange formatting. I think it's becuase I am referencing some number and currency fields as text so it was coming back as 0.0 instead of 0. It also had no £ at the beginning.
I have looked at trying to edit this myself but have had no luck.

Can you help?
 
<apex:outputText label="AccNAme" value="{!IF(Field1 = "Group",Field2,Field3)}" /></apex:outputLabel>
Thank you

Matt
 
Hi,

I have the below piece of code which is returning a Syntax error of 'Missing )'

All looks ok to me??

<td style="width:20%"><apex:outputLabel style="vertical-align:top; text-align:center;font-family:calibri;font-size:35px;color:{!IF(Field1 >0, '#004489', '#d9d9d9')};"><apex:outputField label="AccNAme" value="{!IF(Field2 = "Group", Field3 , Field4)}" /></apex:outputLabel></td>

Any ideas?
Hi,

I am using this very basic code for a VF page. All i want to do is change the colour of the pageblocksection colapsable bars. Can you help?

i have read all sorts of strange ways of doing it, but hoped there was something more straght forward.
 
<apex:pageBlockSection  title="{!Group_Relationship__c.Group_Name_AP__c} Action Plan" columns="4">  
                      
            <div style="float:left; width: 100%;" >
            <apex:pageBlockSection title="Details" columns="4">
                <apex:inputField value="{!Group_Relationship__c.Group_Name__c}" required="false"/>
                
                
                
                </apex:pageBlockSection> 
                     
            </div>

 
I can see this has been asked a lot, but the answers given aren't helping me change my code to work, so I am really hoping someone can do it for me?

Code below, I just need the background being white. Thanks you!
 
<apex:page standardController="Group_Relationship__c" >
<head>
<style>

tr {
    display: block;
    border-bottom: 1px solid #e6e6e6;
}
td {
    padding-left: 40px;
}
table{
    min-width: 1350px;
    }
</style>
</head>


<apex:form >
<table width="100%"> 
  <tr>
    <td style="width:10%"><apex:image id="ManheimRemarketingBuyer" value="{!If(Group_Relationship__c.Group_Name__r.Group_Buyer_RMA_Count_Form__c >0, $Resource.Remarketing_Buyer_Colour, $Resource.Remarketing_Buyer_BW)}" width="200" height="80"/></td>
    <td style="width:10%"><apex:image url="https://c.eu10.visual.force.com/resource/1513853142000/VolumeBoughtYTDPrevYear2" width="175" height="70"/></td>
    <td style="width:20%"><apex:outputLabel style="vertical-align:top; text-align:center;font-family:calibri;font-size:35px;color:{!IF(Group_Relationship__c.Group_Name__r.Group_Buyer_RMA_Count_Form__c >0, '#004489', '#d9d9d9')};"><apex:outputField label="AccNAme" value="{!Group_Relationship__c.Group_Name__r.Remarketing_Buyer_Volume_Group_Join__c}" /></apex:outputLabel></td>
    
    <td style="width:10%"><apex:image id="DealerAuction" value="{!If(Group_Relationship__c.Group_Name__r.Dealer_Auction_Volume_Group_Form__c >0, $Resource.DealerAuctionImage, $Resource.DealerAuctionImageBW)}" width="200" height="80"/></td>
    <td style="width:10%"><apex:image url="https://c.eu10.visual.force.com/resource/1513853196000/VolumeSoldYTDPrevYear" width="175" height="70"/></td>
    <td style="width:20%"><apex:outputLabel style="vertical-align:top; text-align:center;font-family:calibri;font-size:35px;color:{!IF(Group_Relationship__c.Group_Name__r.Dealer_Auction_Volume_Group_Form__c >0, '#25488e', '#d9d9d9')};"><apex:outputField label="AccNAme" value="{!Group_Relationship__c.Group_Name__r.Dealer_Auction_Volume_Group_Form__c}" /></apex:outputLabel></td>
  </tr>
  <tr>
    <td style="width:10%"><apex:image id="ManheimRemarketingVendor" value="{!If(Group_Relationship__c.Group_Name__r.Group_Vendor_RMA_Count_Form__c >0, $Resource.Remarketing_Vendor_Colour, $Resource.Remarketing_Vendor_BW)}" width="200" height="80"/></td>
    <td style="width:10%"><apex:image url="https://c.eu10.visual.force.com/resource/1513853196000/VolumeSoldYTDPrevYear2" width="175" height="70"/></td>
    <td style="width:20%"><apex:outputLabel style="vertical-align:top; text-align:center;font-family:calibri;font-size:35px;color:{!IF(Group_Relationship__c.Group_Name__r.Group_Vendor_RMA_Count_Form__c >0, '#004489', '#d9d9d9')};"><apex:outputField label="AccNAme" value="{!Group_Relationship__c.Group_Name__r.Remarketing_Vendor_Volume_Group_Join__c}" /></apex:outputLabel></td>
    
    <td style="width:10%"><apex:image id="Motors" value="{!If(Group_Relationship__c.Group_Name__r.Motors_co_uk_Accounts_Group_Form__c >0, $Resource.MotorsImage, $Resource.MotorsImageBW)}" width="200" height="80"/></td>
    <td style="width:10%"><apex:image url="https://c.eu10.visual.force.com/resource/1513853893000/RevenueRolling12" width="175" height="70"/></td>
    <td style="width:20%"><apex:outputLabel style="vertical-align:top; text-align:center;font-family:calibri;font-size:35px;color:{!IF(Group_Relationship__c.Group_Name__r.Motors_co_uk_Accounts_Group_Form__c >0, '#3BB97C', '#d9d9d9')};"><apex:outputField label="AccNAme" value="{!Group_Relationship__c.Group_Name__r.Motors_co_uk_Revenue_Group_Form__c}" /></apex:outputLabel></td>
  </tr>
  <tr>
    <td style="width:10%"><apex:image id="Modix" value="{!If(Group_Relationship__c.Group_Name__r.Modix_Accounts_Group_Form__c >0, $Resource.ModixImage, $Resource.ModixImageBW)}" width="200" height="80"/></td>
    <td style="width:10%"><apex:image url="https://c.eu10.visual.force.com/resource/1513853893000/RevenueRolling12" width="175" height="70"/></td>
    <td style="width:20%"><apex:outputLabel style="vertical-align:top; text-align:center;font-family:calibri;font-size:35px;color:{!IF(Group_Relationship__c.Group_Name__r.Modix_Accounts_Group_Form__c >0, '#FD4F00 ', '#d9d9d9')};"><apex:outputField label="AccNAme" value="{!Group_Relationship__c.Group_Name__r.Modix_Revenue_Group_Form__c}" /></apex:outputLabel></td>
    
    <td style="width:10%"><apex:image id="NextGear" value="{!If(Group_Relationship__c.Group_Name__r.Next_Gear_Accounts_Group_Form__c = 'Live', $Resource.NextGearImage, $Resource.NextGearImageBW)}" width="200" height="80"/></td>
    <td style="width:10%"><apex:image url="https://c.eu10.visual.force.com/resource/1513853383000/StatusPaint" width="175" height="70"/></td>
    <td style="width:20%"><apex:outputLabel style="vertical-align:top; text-align:center;font-family:calibri;font-size:35px;color:{!IF(Group_Relationship__c.Group_Name__r.Next_Gear_Accounts_Group_Form__c = 'Live', '#25488e', '#d9d9d9')};"><apex:outputField label="AccNAme" value="{!Group_Relationship__c.Group_Name__r.Next_Gear_Accounts_Group_Form__c}" /></apex:outputLabel></td>
  </tr>
  <tr>
    <td style="width:10%"><apex:image id="Closit" value="{!If(Group_Relationship__c.Group_Name__r.Lead_Management_Accounts_Group_Form__c >0, $Resource.IncadeaSalesColour, $Resource.IncadeaSalesBW)}" width="200" height="80"/></td>
    <td style="width:10%"><apex:image url="https://c.eu10.visual.force.com/resource/1513853893000/RevenueRolling12" width="175" height="70"/></td>
    <td style="width:20%"><apex:outputLabel style="vertical-align:top; text-align:center;font-family:calibri;font-size:35px;color:{!IF(Group_Relationship__c.Group_Name__r.Lead_Management_Accounts_Group_Form__c >0, '#FFA000', '#d9d9d9')};"><apex:outputField label="AccNAme" value="{!Group_Relationship__c.Group_Name__r.Lead_Management_Revenue_Group_Form__c}" /></apex:outputLabel></td>
    
    <td style="width:10%"><apex:image id="RMS" value="{!If(Group_Relationship__c.Group_Name__r.RMS_Accounts_Group_Form__c = 'Live', $Resource.RMSImage, $Resource.RMSImageBW)}" width="200" height="80"/></td>
    <td style="width:10%"><apex:image url="https://c.eu10.visual.force.com/resource/1513853196000/VolumeSoldYTDPrevYear2" width="175" height="70"/></td>
    <td style="width:20%"><apex:outputLabel style="vertical-align:top; text-align:center;font-family:calibri;font-size:35px;color:{!IF(Group_Relationship__c.Group_Name__r.RMS_Accounts_Group_Form__c = 'Live', '#205EAA', '#d9d9d9')};"><apex:outputField label="AccNAme" value="{!Group_Relationship__c.Group_Name__r.RMS_Volume_Sold_Group_Join__c}" /></apex:outputLabel></td>
  </tr>
  <tr>
    <td style="width:10%"><apex:image id="Xtime" value="{!If(Group_Relationship__c.Group_Name__r.XTime_Accounts_Group_Form__c >0, $Resource.IncadeaServiceColour, $Resource.IncadeaServiceBW)}" width="200" height="80"/></td>
    <td style="width:10%"><apex:image url="https://c.eu10.visual.force.com/resource/1513853893000/RevenueRolling12" width="175" height="70"/></td>
    <td style="width:20%"><apex:outputLabel style="vertical-align:top; text-align:center;font-family:calibri;font-size:35px;color:{!IF(Group_Relationship__c.Group_Name__r.XTime_Accounts_Group_Form__c >0, '#FFA000', '#d9d9d9')};"><apex:outputField label="AccNAme" value="{!Group_Relationship__c.Group_Name__r.XTime_Revenue_Group_Form__c}" /></apex:outputLabel></td>
    
    <td style="width:10%"><apex:image id="Movex" value="{!If(Group_Relationship__c.Group_Name__r.Movex_Accounts_Group_Form__c = 'Live', $Resource.Movex_Colour, $Resource.Movex_BW)}" width="200" height="80"/></td>
    <td style="width:10%"><apex:image url="https://c.eu10.visual.force.com/resource/1513853383000/StatusPaint" width="175" height="70"/></td>
    <td style="width:20%"><apex:outputLabel style="vertical-align:top; text-align:center;font-family:calibri;font-size:35px;color:{!IF(Group_Relationship__c.Group_Name__r.Movex_Accounts_Group_Form__c = 'Live', '#0076A6', '#d9d9d9')};"><apex:outputField label="AccNAme" value="{!Group_Relationship__c.Group_Name__r.Movex_Accounts_Group_Form__c}" /></apex:outputLabel></td>
  </tr>
</table>






</apex:form>
</apex:page>

 
Hi,
I have a formula that shows images based on whether certain text is found in a text field. The problem I have is that there are about 30 different images needed and doing it as a formula field exceeds the formula size limit.

Can someone help me replicate this as a visualforce page?

The formula below just shows 3 brands, but if I can get this to work, I can then rework the code to include the others

IF(
CONTAINS( Brand_Concat_Group__c ,"Audi"),
IMAGE("https://c.eu10.visual.force.com/resource/1521024589000/AUDI", "Audi", 80, 100),
null
) & " " &
IF(
CONTAINS(Brand_Concat_Group__c,"BMW"),
IMAGE("https://c.eu10.visual.force.com/resource/1521024614000/BMW", "BMW",80,100),
null
) & " " &
IF(
CONTAINS(Brand_Concat_Group__c,"Fiat"),
IMAGE("https://c.eu10.visual.force.com/resource/1521024641000/FIAT", "Fiat",80,80),
null
)

Thank you

Matt
Hi,

i need your help.  I have a field on the account object called “Brands__c” this field can contain multiple brands split by a comma. However this field can contain duplicate brands, for example Sprite, Coca Cola, Fanta, Sprite. I need s trigger that either fixes that field and remove the duplicate sprite or moves the data to another field and removes the duplicate sprite in the process.

it won’t always be sprite and the field could contain 1 brand or 50 brands.

can anyone help? I have never used triggers before but understand this is my only option.

thank you

matt
Hi,

I am using the below very basic VF code.

I would like to add a banner at the top and bottom in a colour of my choice that also included a reference to a field, for example Account.Name.

I would also like to change to the background colour to a colour of my choice.

Is this possible?



<apex:page standardController="Account" sidebar="false" showheader="false" readOnly="true" >

<apex:form >
<table width="100%">

  <tr>
        <td style="width:40%"><apex:outputLabel style="vertical-align:middle; text-align:center;font-family:calibri;font-size:50px;color:#004489;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
        <apex:outputField label="AccNAme" value="{!Account.Group_View_Account_Name__c}" /></apex:outputLabel></td>        
</tr>
<tr>
        <td style="width:40%"><apex:outputLabel style="vertical-align:top; text-align:centre;font-family:calibri;font-size:20px;color:#ffcc00;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
        <apex:outputField label="AccNAme" value="{!Account.Powered_by_Salesforce_com__c}" /></apex:outputLabel></td>
</tr>  
</table>
</apex:form>

<apex:detail relatedList="false"/>
<apex:relatedList list="Group_Relationships__r"/>
<apex:relatedList list="Activities__r"/>
<apex:relatedList list="Opportunities1__r"/>
<apex:relatedList list="Threats1__r"/>
<apex:relatedList list="Cases__r"/>



</apex:page>

 

Hi,

can any one help what is the attribute that i need to set for  displaying   two Pageblocktables in same pageblocksection side by side.

 

 

Thanks&Regards,

Veerendra