• Melisande Perron
  • NEWBIE
  • 10 Points
  • Member since 2015

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 4
    Questions
  • 1
    Replies
trigger CustomCountryCode on Lead (before insert) {
List<Lead> CustomCountryCode = new List< Lead >();
    for (Lead a : Trigger.new) {    
        a.CountryCode = a.CustomCountryCodeField__c;
    }
}
I'm trying to learn how to make Visualforce pages, and am on the module https://developer.salesforce.com/trailhead/visualforce_fundamentals/visualforce_variables_expressions
I have created the page per the instructions, but now get this Problem on Line 1:
"Incorrect paramenter type for function 'not()'. Expected boolean, received Text" 
for this page which looks exactly like the example in the module:

<apex:page sidebar="false">
 
    <apex:pageBlock title="User Status">
    <apex:pageBlockSection columns="1">
        {! $User.FirstName &''&! $User.LastName }
        ({! $User.Username})
        <p>Today's Date is {! TODAY()} </p>
        <p>Next week will be {! TODAY() + 7}</p>
      
        </apex:pageBlockSection>
    </apex:pageBlock>
    
</apex:page>
-------------
I have removed the "" from around the sidebar="false", but the error persists.

What is wrong?
 
I need to update a custom picklist field, "Program",  on the Lead object when a Lead is added to a campaign.  I created a workflow on Lead, with criteria: Evaluate the rule when a record is created, and any time it’s edited to subsequently meet criteria.  The rule criteria is:
Campaign.Name  = 'Soccer' &&
ISPICKVAL(Campaign.Status, 'Joined')
I activated the rule, but it is not firing. 
I have tried different rule criteria, such as CampaignId='701U0000000xMD3', and have tried using Campaign Member as the rule object, but that won't work because I need to update field on Lead.

Does this require an Apex trigger to work?  I am not a coder...

Thanks for any help!
Meli
 
I  didn't write the code for this, but have an issue that has me stumped: We have a VF page that overrides the "New Contact" on Account button.  It works perfectly for our System Admin, and most other Profiles, but for one Profile (has API Enabled), gets into an infinite browser redirect when he clicks on the button. When the Sys Admin logs in as that Profile, he can recreate the issue.
The page should resolve first to the Record Type selection page, but instead loops between these two urls, and the page never loads:

https://na4.salesforce.com/setup/ui/recordtypeselect.jsp?....
https://uniqueentry.na4.visual.force.com/apex/uniqueContact?....

Since it works fine for the Sys Admin, but not for that Profile, what kind of permissions or other things could be causing this?

Thanks!
I need to update a custom picklist field, "Program",  on the Lead object when a Lead is added to a campaign.  I created a workflow on Lead, with criteria: Evaluate the rule when a record is created, and any time it’s edited to subsequently meet criteria.  The rule criteria is:
Campaign.Name  = 'Soccer' &&
ISPICKVAL(Campaign.Status, 'Joined')
I activated the rule, but it is not firing. 
I have tried different rule criteria, such as CampaignId='701U0000000xMD3', and have tried using Campaign Member as the rule object, but that won't work because I need to update field on Lead.

Does this require an Apex trigger to work?  I am not a coder...

Thanks for any help!
Meli