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

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 21
    Questions
  • 41
    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 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'd like to force Single Sign all for all profiles except System Administrators. 
Is it possible ? I don't want to force SSO yet because I'm afraid admin won't be able to log in once I forced it. 

I reached salesforce support but they don't handle SSO request for standard support customers. 

Nathan
I have a web-to-case form that is created and working.  I want to send a link by email from within Salesforce.  How do I prepopulate specific fields on the form?  I don't want them to be hidden inputs, because I want the recipient to see them and possibly change the information.

I can inspect the form fields, get the id and add the info to the URL string, but the information isn't displayed in the VisualForce page form.

Link in email:    http://mydomain.com/myform?name={!Contact.Name}&email={!Contact.Email}

URL that is visited:
http://mydomain.com/myform?name=John&email=john@email.com

But the fields in the form are blank.
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