• Kenny Jacobson
  • NEWBIE
  • 75 Points
  • Member since 2014
  • Developer
  • Datawin Consulting


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

I have a client that is using Custom Labels as their own custom global variables (or "properties" or "name/value pairs" whatever you want to call them).  I'm just wondering if this is a common practice?  Are there any drawbacks?  It seems pretty ingenious to me, I had just never seen it before.

Here is an example of what I'm talking about:

Create a new Custom Label with Name = "Global_PublicKey" and Value="1234xyz"

So in Apex you just reference the value as Label.Global_PublicKey

private boolean isAuthorized(){
        String qPublickKey = ApexPages.currentPage().getParameters().get('publicKey');
        return qPublickKey.contains(Label.Global_PublicKey);
}
In a VisualForce page you refence it {!$Label.Global_PublicKey}:
<apex:page sidebar="false" showHeader="false"  >
   <apex:pageBlock title="Test">
   Global Variable PublicKey = {!$Label.Global_PublicKey}
   </apex:pageBlock>
</apex:page>

Thoughts?
 


 

Not able to retrieve fields from contact.

<apex:page standardController="contact" recordSetVar="contacts" >
<apex:form >
<apex:pageBlock title="Viewing Contacts">
<apex:pageBlockTable value="{!contacts}" var="c">
<apex:column value="{!c.name}"/>
</apex:pageBlockTable>
<apex:pageBlockButtons >
<apex:commandButton value="Save" action="{!Save}" />
</apex:pageBlockButtons>
</apex:pageBlock>
</apex:form>
</apex:page>
We have set-up Salesforce for Outlook to create activity records of the email type on the contact standard object.

We have also written an Apex Trigger to create records on a separate custom object when new activities of the email type are created on the contact standard object.

Each of these actions work independently when tested but when we attempt to use them together we are receiving an error message (in the Outlook sidebar).  Salesforce for Outlook will not create the activities when the trigger is installed.

Any guidance in problem-solving this issue is greatly appreciated.
 
Hi I am looking for a easy way to print or export a large Field Dependency matrix in excel. I am new to saleforce please guide me with complete details.
  • January 30, 2014
  • Like
  • 0