• JustAGirlyGeek
  • 634 Points
  • Member since 2012
  • Salesforce Applications Manager
  • Radio Frequency Systems

  • Chatter
  • 19
    Best Answers
  • 0
    Likes Received
  • 8
    Likes Given
  • 3
  • 146
on https://developer.salesforce.com/trailhead/manage_the_sfdc_way_ohana/msfw_ohana_liv_vals
  • June 17, 2016
  • Like
  • 0
Hi all,

I am trying to create a formula that will calculate a certain amount ,according to specific dates (NPSP version). It seems like I have a problem with the date format, since this is the error message I get:
"Error: Incorrect parameter type for operator '>='. Expected Date, received Number"

This is the formula:
IF(npe01__Payment_Date__c >= 2008-01-01 && npe01__Payment_Date__c < 2011-01-01, npe01__Payment_Amount__c*1.25+3.21,  IF(npe01__Payment_Date__c > 2011-01-01, npe01__Payment_Amount__c*1.25, npe01__Payment_Amount__c) )

The Payment Amount date is a date field. Does anyone have any idea regards to how should I type the date correctly?

Any help much appreciated,


I just created an Apex Trigger (with the help of the forum) on the Note object. The trigger works great when a new note is created from the Old-Note section but does not work when entering a note from the new lightning experience. Are the new notes being writting in a different object? Any guidance would be fantastic. 
trigger UpdateOppLastNote on Note (after insert, after update) {

List<Opportunity> oppLstToUpdate=new List<Opportunity>();
        for(Note nt : Trigger.new){
                Opportunity opp=new Opportunity(Id=nt.parentId,Latest_Note__c=nt.Title + ': ' + nt.Body); 
        for(Note nt : Trigger.new){
                if(nt.Body != Trigger.oldMap.get(nt.Id).Body){
                   Opportunity opp=new Opportunity(Id=nt.parentId,Latest_Note__c=nt.Title + ': ' + nt.Body); 
            update oppLstToUpdate;
        }catch(DmlException de ){



I have a button, on clicking on this button a page opens it has many lines like the code i pasted below.
The button always redirects to the sandbox or asks for login
I have a code like below on a VF page$
<td width="10"><img src="https://c.eu2.visual.force.com/servlet/servlet.FileDownload?file=015b0000001EF10"  width="10" height="12" 

It works well in Sandbox, but not on prod. Before it was workign well in prod too.
what can be reason .
It awways redirects to sandbox or asks for login
  • May 19, 2016
  • Like
  • 0

What I have to do is to give a user access just to the few objects (standard and custom). He is also allowed to see just certain fields of those objects. Everything else should not be accessable for this user. I know I can create custom views and field security but I can't find anything how to do this restrictions on object level. How would you approach to this task? Any good articles on this issue?

Thank you in advance.
I'm on the 'Using Standard List Controllers ' module in the VisualForce Basics trail and I have completed the challenge and my VF page works.
Here is the challenge:
Using a Standard List Controller, create a Visualforce page which displays a list of Accounts with links to their respective record detail pages.
The page must be named 'AccountList'.
It must reference the Account standard controller.
It must have a recordSetVar equal to 'accounts'.
It must have a Visualforce apex:repeat component.
The repeater must have the var attribute set to 'a'.
The repeater must use the <li> HTML list tag
The repeater must use the apex:outputLink component to link to the respective record detail page
HINT: Record detail pages can be reached by placing a record ID at the root of the URL (e.g. '/<record id>').

Here is my page content:
<apex:page standardController="Account" recordSetVar="accounts">
    <apex:pageBlock >
        <apex:repeat var="a" value="{!accounts}">
                <apex:outputLink id="DetailLink" value="https://eu5.salesforce.com/{!a.Id}">
                <apex:outputField value="{!a.Name}"/>

When I hit the 'Check Challenge' button, a message displays this:
Challenge Not yet complete... here's what's wrong: 
The page does not bind to the record ID value (in order to link to the record detail page)

It is not clear what is wrong. Can this be clarified please?
I was hoping someone would be able to hlep me with this Challenge. I understand the core concept and have done everything correctly, but the system will not allow me to upload a photography.

Below is the message stating I am not completing the challenge. (Shown Below)
User-added image

I review my profile and obviously the picture is not updated, so I attempt to upload a picture and after uploading nothing changes on my profile.
First I hover over "Moderator" and select "Add Photo" (Shown Below)​
User-added image
Then I select Choose File and select "Save" (Shown Below)​
User-added image

Then the system uploads the photo and asks me to crop the image - I select either to crop it or to just keep it full size (either way nothing happens). Then after cropping the image I click save. (Shown Below)
I have also tried to upload a .PNG, .JPG, and a .GIF of different images.

User-added image

Finally the page refreshes and nothing changes. (Shown Below)
User-added image

Sorry for the long post, but if I am missing a step or doing something wrong would someone mind explaining it to me? I feel like I understand how everything is working and this is a bug. I also checked my total size availability and I still have more than enough space. (Shown Below)
  • Currency Locale English (United States) - USD
  • Newsletter [Checked] Used Data Space 5.9 MB (119%) [View]
  • Admin Newsletter [Checked] Used File Space 22 KB (0%) [View]
  • Hide Notices About System Maintenance [Not Checked] API Requests, Last 24 Hours 74 (15,000 max)
  • Hide Notices About System Downtime [Not Checked] Streaming API Events, Last 24 Hours 0 (10,000 max)
Thanks for anyone who can help, and I appreciate the support. I didn't see any other referneces to this error in the form, so if I did miss something please help me find it. 

I have added a new Price book with 30 Products in it. 
For the exsisting opportunities, there already exsist old products from old Price books.

I want to choose new price book for the opportunity and at the same time i also want to keep the old products, How is it possible ?
  • January 26, 2016
  • Like
  • 0
hi All , 
howw to create a report on the opportunity object  , where i need a report that tells me the amount of  opportunitys in each  stages in production  org. 

I would need the follow columns :

•    Opportunity Stage
•    Amount of records for this Opportunity stage.
I have completed 8 Badge. 4 from Developer and 4 from Admin. Will i get T-Shirt?
Hi All,
I am about to give Admin Certification in 2 weeks.Can anyone point me to the websites where I can get the Latest Certification Questions to prepare.

Hi, I have 12 trailhead badges and enough of points.

Screenshot for claiming T-shirt

Please see the above screenshot and guide me to claim T-shirt :)
what is the use of OID here and Why we use RET URL pls explain?
<form action="https://dtdcservice--DEV.cs31.my.salesforce.com/servlet/servlet.WebToCase?encoding=UTF-8" method="POST">
<input type=hidden name="orgid" value="00Dp00000000OXn">
<input type=hidden name="retURL" value="https://www.google.co.in/">
<input type=hidden name="recordType" id="recordType" value="01290000000i3cs"/>
Any idea how to move old notes to the new enhanced notes and maintain the original owner/creator and date/time?

While creation of eports, what does this check box makes the difference
Save Hierarchy Level
I see different number of records displayed depending on if we select this check box or Not.

Thanks for suggestions
  • December 04, 2015
  • Like
  • 0
I'm in need of help creating a Validation rule that does the following task: Field Report level must be completed if Contact or Report Broker fields are updated.
I have a pick list called "Year" which referes to person Year of birth and I want to calculate the approximate age in years and display in a text field so how do write a formula field to get the Approx Age of the person. 

Could you please help some on this

When I accepted lead records in my Queue it should assigned to me ( I mean Im the owner of that record when i clicked on accept mean time it should also get changed its status open to in progress , how to achieve this.)

Vijay S
On our Opportunity page layout, there is a custom button called "Quote". The code behind this button exports the data into an Excel spreadsheet.
I need to find a way to export it into a different format, preferrably either a Word doc or a PDF.
Here is the code for the button now...


I am hoping it's as easy and just changing the "csv" in the formula to "doc": or "pdf".

In Classic, you can create a simple Visualforce page to export records to Excel using contentType. For example:
<apex:page StandardController="Opportunity" contentType="application/vnd.ms-excel#export_{!NOW()}.xls">
    <apex:pageBlock title="Export Results">
        <apex:pageBlockTable value="{!Opportunity.OpportunityLineItems}" var="item">
            <apex:column value="{!item.PricebookEntry.Name}"/>        
            <apex:column value="{!item.PricebookEntry.ProductCode}"/>    
            <apex:column value="{!item.Description}"/>
            <apex:column value="{!item.ServiceDate}"/>
            <apex:column value="{!item.Quantity}"/>
            <apex:column value="{!item.Sales_Price__c}"/>            
            <apex:column value="{!item.TotalPrice}"/> 

I need this to work in Lightning but I am hitting a roadblock with getting this to work right. If I use a custom button to call the VF page, the export works, but leaves me with a blank screen instead of taking me back to the record where I clicked the button. If I use a Quick Action to call the VF page, it still works, but now leaves me with a modal and the only option is to click Cancel.

What are my other options here? I am not a developer so my skills are a bit limited. TIA!

I was wondering if someone would be able to help me create a test class for the following code as I am programmatically challenged and have very limited developer experience :) any help would be greatly appreciated!!! Thanks in advance!!!


trigger OpportunityValidations on Opportunity(before update){

    Set<Id> oppsToBeChecked = new Set<Id>();
    Profile adminId = [SELECT Id from Profile where Name='System Administrator' LIMIT 1];
    for(Opportunity o : trigger.new){
        if(o.Probability >= 70 && UserInfo.getProfileId() != adminId.Id){
    // check their products in greater detail
    if(!oppsToBeChecked.isEmpty()) { // maybe we don't need to run the query at all?   
        for(OpportunityLineItem oli : [SELECT OpportunityId
        FROM OpportunityLineItem
        WHERE OpportunityId IN :oppsToBeChecked
            AND PriceBookEntry.Product2.RecordType.DeveloperName = 'Prospect_Product'
            AND PriceBookEntry.Product2.Approved__c = false]){

        trigger.newMap.get(oli.OpportunityId).addError('Opportunities with => 70% must not include Prospect Products. Please replace these with real SAP Products to continue.');

I have been tasked with finding a way to prevent users from moving to 70% or greater probability in an opportunity when Opportunity Products with a certain record type exist. We have valid SAP products and what we call Prospect Products (these shouldn't be allowed in opportunity with 70% or greater probability). We are also thinking of adding a field to the product table for prospect products that are "allowed" so those would obviously need to be excluded from the criteria and will be allowed in the forecast.


I know this can be done with Rollup summary fields and validation rules but it's very clunky and not full proof. I am thinking a trigger would be more suitable but I wouldn't even know where to start with my VERY limited code writing capabilities.


Anyone willing to take on this challenge? Thanks in advance!

In Classic, you can create a simple Visualforce page to export records to Excel using contentType. For example:
<apex:page StandardController="Opportunity" contentType="application/vnd.ms-excel#export_{!NOW()}.xls">
    <apex:pageBlock title="Export Results">
        <apex:pageBlockTable value="{!Opportunity.OpportunityLineItems}" var="item">
            <apex:column value="{!item.PricebookEntry.Name}"/>        
            <apex:column value="{!item.PricebookEntry.ProductCode}"/>    
            <apex:column value="{!item.Description}"/>
            <apex:column value="{!item.ServiceDate}"/>
            <apex:column value="{!item.Quantity}"/>
            <apex:column value="{!item.Sales_Price__c}"/>            
            <apex:column value="{!item.TotalPrice}"/> 

I need this to work in Lightning but I am hitting a roadblock with getting this to work right. If I use a custom button to call the VF page, the export works, but leaves me with a blank screen instead of taking me back to the record where I clicked the button. If I use a Quick Action to call the VF page, it still works, but now leaves me with a modal and the only option is to click Cancel.

What are my other options here? I am not a developer so my skills are a bit limited. TIA!

I contacted Salesforce support for assistance in updating the created date on a bunch of opportunities I already loaded into our org as part of our transition from another sales tool.

I know I cannot update the created date via Data Loader. I do know I can delete and reinstert the opportunities with the audit permissions, however, I would lose any history of changes made to the opportunities already. (This also scares the heck out of me - and doing so would generate new opportunity IDs when we have multiple files already mapping to the existing opportunity IDs as there are more fields that may get mapped...) I already have the actual created date loaded into another temporary field, so I know which opportunities need to be updated and with what date.

Can someone please help?  Thanks! ~Andi 


From what I have seen so far and what I was told when I joined the salesforce community, was that in sandboxes User Lic does not apply. Which is good and bad. Bad because unknowingly you may create a system design that would require a lic to an object which in PROD you may not have lic to or not all users have lic to do something or have access to a custom object.

Is there a way to test your system design using custom objects respecting PROD Lic in sandbox? So that you can avoid the situation where the solution worked great in sandbox but come PROD due to insufficient lic, things just do not work.

I have had this sort of question from customers a few times and not sure how to best answer that.
  • December 23, 2016
  • Like
  • 0
Once a user creates a quote, they may add product by clicking on Add Line Item.  Once they click on that button the will be prompted to go to next page where they can select different product/s. After they have selected the products,  user then can enter in the quantity or change the price of the product right there. How can I access those fields in that page and write validation ruels in that page?
Hi All, 

Our Requirement:

We have built a custom report in Lightning using lightning component as per the customer requirement.
Customer would like to have a downloadable as CSV for this custom report so that users can just download it and it will be downloaded with all the records with out any limits.

Currently we are sending out an email of custom report which is having heap size limit.
Quick help would be much appreciated.

Hello, I'm looking to use the Salesforce REST api to get data from the system into a sharepoint site. We've setup the whitelisted domains in the CORS section but are still getting the "XMLHttpRequest for [URL] required Cross Origin Resource Sharing (CORS)" error.

Our sharepoint site is on our internal network and I was wondering if that's why the whitelisted domain isn't working. Is there a way to get around this?

Here's the javascript call I'm using, just in case I missed something and it's actually a programming error.
        $(document).ready(function() {
                       url: "https://my.salesforce.com/services/data.json
               }).done(function(data) {
                }).fail(function (jqXHR, textStatus) {
                         alert('error: ' + jqXHR);

I am trying to run a query that has multiple conditions in the WHERE clause. If I reduce it to a single condition by removing two of the other conditions I need, the query works. I have three conditions and I have tried a query with each individual condition. They all work. However, when they are combined using AND, I receive an error. I have tried all different combinations of using parentheses to see if it makes a difference, but no luck. To provide an example, I have replaced the field names,object names, and values with fake names. I am using the developer console's query editor at this time.

SELECT SUM(CustomField1) FROM CustomObject__c WHERE CustomField1 = 'Value1' AND CustomField2 = 'Value2' AND CustomField3 != 'Value3'

I have referenced the SOQL documentation but no luck. Do you see anything wrong with my query?
I've created a trigger under contacts to populate a custom field on the Account object that says how many contacts are under that one account. It's been uploaded through sandbox, but it doesn't seem to be working. Here's the code I'm using: 

Trigger NumberContacts on Contact(after update,after insert){
    Set<ID> accids=New Set<ID>();
    For(contact c:trigger.new){

    Map<ID,Account> Acc= new Map<ID,Account>([Select ID, No_of_Contacts_SFDC__c from account where id IN:accids ]);
    Map<ID,Account> updateMap = new Map<ID,Account>();
    for(Account ac :Acc.values())
        Integer count = 0;
        for(Contact c:Trigger.New){
            if(ac.Id == c.AccountId)
                count = count + 1;
        ac.No_of_Contacts_SFDC__c= count;

        update updateMap.values();

Is there something wrong with the code? The field updates to 1 the first time I add a contact, and then nothing updates after that. Not sure what's going on. Thanks! 

I earned the Apex specialist super badge in first attemp, everything was done in first attempt but I did not recive the shinny badge with yellow border, just got simple badge. 
Am I missing something ?
Please let me know.
I have created a workflow on Quote object with Criteria (Quote :  Status equals : Accepted) then added an immediate action to update field - Opportuinty Stage to Closed Won. This workflow is not triggering. Even if i change the status using edit button on quote or flows.

Quote status is modified using Visual Flows on generate orders. 

Can someone help me!!
I have created a workflow in process builder to map a picklist field from a custom object into a contact object. I can successfully map other picklist fields but this one gives the above error. The only thing I can think of is it might be too long, the picklist is UK counties. I'm using a global picklist so I know that both picklists are identical. The error message is below. Grateful for any ideas. I have 3 other picklist fields that failed too, one a multi-picklist, but I'll tackle those later.

Create one Contact record where:
Birthdate = {!myVariable_current.Date_of_Birth__c} (06 July 1996)
Charity_Referrers__c = {!myVariable_current.Charity_referrers__c} (null)
College_Referrers__c = {!myVariable_current.College_Referrers__c} (null)
County_of_origin__c = {!myVariable_current.County_of_origin__c} (Berkshire)
FirstName = {!myVariable_current.First_Name__c} (Test)
Gender__c = {!myVariable_current.Gender__c} (Female)
LastName = {!myVariable_current.Last_Name__c} (Dodd)
Local_Authority_Referrers__c = {!myVariable_current.Local_Authority_referrers__c} (null)
MobilePhone = {!myVariable_current.Mobile_Phone__c} (06610230804)
Next_of_Kin_First_name__c = {!myVariable_current.Next_of_Kin_First_Name__c} (null)
Next_of_kin_Last_name__c = {!myVariable_current.Next_of_Kin_Last_Name__c} (null)
Previous_accommodation__c = {!myVariable_current.Previous_accommodation__c} (null)
RecordTypeId = 01258000000U464
Referral_Agency__c = {!myVariable_current.Referral_Agency__c} (null)
Social_Services_Referrers__c = {!myVariable_current.Social_Services_Referrers__c} (null)
Town_of_origin__c = {!myVariable_current.Town_of_origin__c} (Slough)
npe01__HomeEmail__c = {!myVariable_current.Email_address__c} (dodd@gmail.com)
Failed to create record.

Error Occurred: INSERT --- INSERT FAILED --- ERRORS : (INVALID_OR_NULL_FOR_RESTRICTED_PICKLIST) bad value for restricted picklist field: Berkshire, 

I have created 3 CSV files for given three excel sheet in excel file for contacts, opportunities and hobbies. I have created COntact Hobby and Hobbies as custom Text fields.... I have started importing data in Standard Objects and mapped Name with COntact name and Address details with Account Billing details. I have mapped Hobbies column in CSV file with Contact Hobby in Salesforce in Standard Objects... Once the import is finished, I am able to see everything in the details of contact except Hobby section and COntact Hobby Sectionfields which are blank... Please let me know how to deal with this and have I done the right field type for custom fields..Need your help in importing the data in right way through Data Import wizard...

User-added image
User-added image
im doing the Reports & Dashboards Specialist superbadge, im stuck on the first part where you have to 
Import survey and opportunity data into salesforce. i have imported the accounts, Opportunities and contacts but for some reason the account name isn't showing up in the contacts tab next to the name. im using dataloader but i have tried data import wizards but that didn't do a good job. on dataloder when you are mapping the fields there is no account name, so i searched up and says use accountid but that doesn't work  and fails to upload the data from the spreadsheet. the error is "Account ID: id value of incorrect type: Acestrip Sports" has this error for every one but different companies. How would i fix this?

thanks to who ever helps
Can we export list of records from a lightning page to Excel sheet on click of button?In VF pages we use ContentType ,how can we do the same in Lightning?

Thanks in advance

I'm using a new DE for this badge but I have the error code b when I check the "Create sales dashboards in Salesforce Classic" challenge.

The complete arror message below :
Challenge Not yet complete... here's what's wrong: 
There was an unexpected error while verifying this challenge. Usually this is due to some pre-existing configuration or code in the challenge Org. We recommend using a new Developer Edition (DE) to check this challenge. If you're using a new DE and seeing this error, please post to the developer forums and reference error id: MQOVJUPM

Can you help me ?

In advance, thank you !


We have a custom object for check depsosits, when our clients send in a check, a new record is created with the check information and account it is supposed to be deposited into. We would like to have an email sent to the client once we have completed the record. It would be best that the email was not driven off of when the record is closed so that we avoid sending duplicate emails.

The best option we can think of is creating a button to send an email manually after the record has been completed. We would like for it to be automatic, but can't figure out how to do so without an email being sent each time the record is saved.

Any other recommendations?
I needed to be able to customize the fields visible on the Contact Role Opportunity related list to add the Contact Mobile Phone. I searched Answers and the famous Deepak came up with a brillant work-around solution using VisualForce (see link to the original thread below).


I used the VF code he provided and modified it to pull in the Contact Mobile Phone into the Contact Roles related list on the Opportunity. It works perfectly except for a couple of things:
  • When I click to add a New Contact Role in the new VF page on the Opportunity, it pulls it in within the full SF tab and sidebar window (see screen shot below).
  • There is no link to the Contact record in the VF Contact Role related list (see screen shot below).
Add New Contact Role Opens in the full SF tab and sidebar window Shot
User-added image

VF Contact Role has no link to the Contact record​
User-added image

Does anyone know if is there a way to modify the VF code Deepak provided to resolve these two issues? 

Any help or advice will be most appreciated!

I'm working on the Adding Business Logic trailhead challenge
When entering the advanced formula I copy and paste the formula directly from the challenge

IF(ISBLANK(Implemented_Date__c), TODAY() - DATEVALUE(CreatedDate), Implemented_Date__c - DATEVALUE(CreatedDate) )

and receive 

Error: Incorrect parameter type for operator '-'. Expected Number, DateTime, received Date

I'm very new to admin and have no clue why this isn't working. Any help is appreciated! 
What is this all About?? 

Thank you
BLearn - Sai
Last week, it was brought to my attention that security reviews and audits are now asking ISVs to check for Field Level Security (FLS) and Object CRUD permissions prior to any DML outside of standard controllers.  

This is a fairly radical change that impacts a lot of managed package applications across the board. I and others have several concerns about this change in the security review process:
  1. Why the sudden change in security review policy?  
    • None of the ISVs I have talked to were informed of the change prior to being either audited or submitting any apps for security review.  The only official documentation I can find on the change is a blurb in the Security Scanner help page here: http://security.force.com/security/tools/forcecom/scannerhelp.  
    • As ISVs, it would be greatly appreciated to have an official Security Review Guide, that is updated well in advance to when policy changes like this take place.  Some ISVs have several packages, others lots of customizations, and we all need time to prepare for the security review.
  2. Has the security scanner been updated to enforce this rule yet?
    1. I have not run an app through the Security Review process recently, so I am curious if this rule has been implemented already in the security scanner. (http://security.force.com/security/tools/forcecom/scanner)
  3. Why force FLS and CRUD checks on every DML transaction?
    • I am a fan of using standard controllers when necessary, but several apps, including one my company develops rely heavily on Custom Controllers.  In most cases where FLS comes into play, typically it's a simple fix of a profile permission or permission set that resolves the issue.  Instead, now, we have to implement FLS and CRUD checking prior to each DML transaction.  This adds complexity on top of existing DML calls.  
    • If need be, can the FLS and CRUD checking be done on a one-time run in an install script?
    • Does Salesforce have any plans of either adding FLS checking for custom controllers or adding methods to Apex for checking credentials similar to the Force.com EASPI library? (https://code.google.com/p/force-dot-com-esapi/)
Thanks, I look forward to hearing any feedback on this issue.

When someone takes the time/effort to repspond to your question, you should take the time/effort to either mark the question as "Solved", or post a Follow-Up with addtional information.  


That way people with a similar question can find the Solution without having to re-post the same question again and again. And the people who reply to your post know that the issue has been resolved and they can stop working on it.