• phiberoptik
  • 1189 Points
  • Member since 2012

  • Chatter
  • 44
    Best Answers
  • 1
    Likes Received
  • 1
    Likes Given
  • 11
  • 300
Hi - I need help pushing a field.

I'm trying to push the discount field from my Opportunity Product into a Quote and the Quote line item. I have tried using workflow rules with field updates and it doesn't seem to be working. Any ideas how I can accomplish this?


I am trying to set up an email alert to be sent 30 days after the date in a date field. I set up a time dependent workflow rule, but it is sending the alert 30 days after the field is populated. I need it to be based on the actual date in the field. Customer service said I needed to set up a formula and I had to come here to get help with it. Can anyone help me with this? I have never used formulas in Salesforce before. Thanks for your help.

I am trying to figure out a way to embed a button/link on a campaign that allows me to see the status of the HTML email that I send to leads and prospects.

I currently have this custom button:



The problem is that it takes me to the campaign report rather than the HTML email report where I can see who clicked open, last open, how many times open, opted out, etc.


How do I create a quick link on a campaign that associates the members who have received an HTML email so that I can see status?

  • February 20, 2013
  • Like
  • 0

Looking to find a formula that will combine 2 Date/Time fields and calulate time. Like for example:


Start Time: 2/5/13 10:00am

Stop Time: 2/5/13 11:30am 


Total: 1.50 or 1hr 30 mins


Can some please help?




  • February 05, 2013
  • Like
  • 0



I am trying to come up with a validation rule that the Quote Name Field will only be able to include the names Original, Rebid 1, Rebid 2, etc.  I am not sure what kind of value to use.  Please suggest something.



Hello, I created this Validation Rule, however, it does not execute properly when I save a record.


The idea is when "In Negotiations" is "No" and the field "Description of Negotiation" is left blank and user tries to save the record, the user should be prompted to fill in the "Description of Negotiation" field, however, this is not executing correctly.


Any ideas?





ISPICKVAL(In_Negotiations__c, "No"),



I need help with formula field. Right now i have a fields called "Mailing Name" and i have to bring a part of text from that field into a formula field.



Mailing Name : India CO (243)


I just want the number in the brackets in the formula field. I tried to create one like the below

MID(Mailing_Name__c, FIND("(", Mailing_Name__c), FIND(")", Mailing_Name__c)) but the output for the formula field ia (243) and i just want the number not the brackets.


Is there any other way of creating this formula field where i can just pull the number in the brackets of the Mailing Name field.





I have a simple formual that calculates sales growth percent.


Current YTD Sales Annualized / Current Year Goal  or


Current_TYD_Sales_Annualized__c / Current_Year_Goal__c


how can I have it return a result of 0 instead of an #Error! if either of those to fields contain a zero or null value?



I have the formula in Excel, I just don't know how to convert it so Salesforce recognizes it.


The Excel formula is


((YTD Sales / (365- (DATE (2013,12,31) - TODAY ()))*365))


Thanks :-)

I am trying to add a date value to a hyperlink to pass to a task I have tried tsk4=TODAY() and and '&tsk4=TODAY()&' with no luck.  I do understand that the hyperlink function is all text based, but I really need to pass the Due Date from the Hyperlink to the task.



  • January 22, 2013
  • Like
  • 0

Hello all,


I have two objects and I need to use a formula/WF to bring the value of a field from Object A to Object B but only if ObjectA_Date_Field matches Object B_Date_Field. Thanks in advance for your help!


I've created three fields , one on the lead page, the second on the contact page and a third on the campaign members page. But I looking for a formula to be used on the campaign member page that would read the value of the  lead or conatct page fields. It would be either or. The list is also a pick list...


TEXT( Lead.Lead_Source_Segment__c )
TEXT( Contact.Lead_Source_Segment__c )


IF(NOT(ISBLANK(Lead.Lead_Source_Segment__c ))&& ISBLANK(Contact.Lead_Source_Segment__c ), Lead.Lead_Source_Segment__c
IF(NOT(ISBLANK(Contact.Lead_Source_Segment__c ))&& ISBLANK(Lead.Lead_Source_Segment__c), Contact.Lead_Source_Segment__c ,
IF(NOT(ISBLANK (Lead.Lead_Source_Segment__c ))&& NOT(ISBLANK(Contact.Lead_Source_Segment__c )), Contact.Lead_Source_Segment__c ,


Error: Syntax error. Found 'Lead.Lead_Source_Segment__c


IF(NOT( ISPICKVAL(Lead.Lead_Source_Segment__c ))&& ISPICKVAL(Contact.Lead_Source_Segment__c ), Lead.Lead_Source_Segment__c
IF(NOT(ISPICKVAL (Contact.Lead_Source_Segment__c ))&& ISPICKVAL(Lead.Lead_Source_Segment__c), Contact.Lead_Source_Segment__c ,
IF(NOT(ISPICKVAL (Lead.Lead_Source_Segment__c ))&& NOT(ISPICKVAL(Contact.Lead_Source_Segment__c )), Contact.Lead_Source_Segment__c ,


Error: Syntax error. Found 'Lead.Lead_Source_Segment__c'


I have 2 record types on the task record. One called "Custom" and another called "Standard".  The default record type for all users is Standard. I created 2 formula fields (Custom and Standard)  that are images in the documents folder. Depending which is clicked, it should auto land on that page layout. It works for the standard but how can i make it for the custom?


How can I make this work?


Stanard(this works)

HYPERLINK('/00T/e?who_id='& Id & '&retURL=' & Id, IMAGE('/servlet/servlet.FileDownload?file=01540000000xKUQ', 'Standard)) 
& ' ' &


Custom(fails and says missing ')'

HYPERLINK('/00T/e?who_id='& Id & '&retURL=' & Id&RecordType=01240000000UWKG, IMAGE('/servlet/servlet.FileDownload?file=01540000000xKUB', 'Custom'))
& ' ' &

Here is my current formula ISPICKVAL(Record_Type_Toggle__c, 'Contract') and what I am trying to do is make an email alert send if the Record Type Toggle is "Contract".  The picklist consist of Contract and Change Order and I do not want an email to go out if it is a Change Order. Please let me know of other formulas I could try.



I'm trying to create a validation rule that will stop a user from selecting an account that is not a service provider from a custom field. The validation rule needs to ignore everything else on the case page.


this is the custom field and it is a picklist.





If someone could help, I would appreciate it


  • November 19, 2012
  • Like
  • 0

I have two Object Project & Milestone in M-D relationship. Project  object has Project_Start_Date__c and Project_End_Date__c   &In  Milestone Object has Milestone_Start_Date__c & Milestone_End_Date__c.


Now , I want  a validation rule , Where Milestone_Start_Date__c & MileStone_End_Date__c  value should be always In Between Project start & End date.

I Try the code below , But didn't work.:(



Milestone_Start_Date__c  >=   Project__r.Project_Start_Date__c   &&   Milestone_End_Date__c  <=  Project__r.Project_End_Date__c 




Thanks In advance!! :-)

  • November 19, 2012
  • Like
  • 0



I am dealing with dynamic dashboards and i have to setup filters for date values. I am trying with TODAY, THIS WEEK etc.,. just like how we choose the range with reports. Can anyone please tell me what are the list of text values that i can use in the date fields. (eg, today, this week, this month, last week, last month, etc,.,)


I would really appreciate your help. I just couldnt figure out the right dcoument if there is one for the same. 



  • November 14, 2012
  • Like
  • 0



I have a question about the filter for dynamic dashboards. Does typing in TODAY/ THIS WEEK / THIS MONTH work for a created date field in filter criteria for the dashboard itself (not the report filter). I do not want to choose the date from the calendar view and i dont see anything for today or this week kind of stuff like how reports have it. Can anyone please let me know. 



  • November 13, 2012
  • Like
  • 1

Can anyone please help with creating a validation rule that prevents a certain Profile Name from being able to change the "Assigned To' field.  All other profile names should be able to change the 'Assigned To' unless Profile = 'C User'

I have a picklist field called Primary_Complaint_Code__c which includes about 200 values. If there is any value in this field, I would like to transfer that value to a new text field called All_Complaint_Codes__c. I'm hoping there is a way to specify all value rather than adding a line for each of the 200 values. I also have 2 other fields Secondary_Complaint_Code__c and Third_Complaint_Code__c with the same values and I need a field that holds all values for all Codes for reporting purposes. 


IF(ISPICKVAL( Primary_Complaint_Code__c ,"Smart Meters"),"Smart Meters;", null)


My report would be:

All_Complaint_Codes__c contain "Smart Meters" rather than having Primary_Complaint_Code = Smart Meters  or Secondary_Complaint_Code__c = Smart Meters or Third_Complaint_Code__c = Smart Meters.



We have a client with a customer community that consists of a series of Visualforce pages. Part of the user experience involves accessing some public VF pages as well, and have had a seamless user experience until the Winter 16 update. Now users are routed to the login screen when they attempt to access the public pages.

Has anyone else experienced this or found a solution for it? Thanks All!
The end goal is to fire a validation rule without a user having to click Edit and then Save. The action is to "validate" that the record is ready to be submitted for approval. Since I cannot invoke a validation rule through the Submit for Approval button being pressed, I would like for the end users to be able to click a "Validate" button that will edit and save a record in order to check validation. If they invoke the rule, they know they are not ready to submit it and they receive the error message informing them of the fields they are missing. If they dont receive the message, they know they are ready to submit it for approval.

Thanks in Advance.
trigger ContactRollUpCampaigns on Campaign (after delete, after insert, after update) {
  //Limit the size of list by using Sets which do not contain duplicate elements
  set ContactIds = new set();
  //When adding new Campaigns or updating existing Campaigns
  if(trigger.isInsert || trigger.isUpdate){
    for(Campaign p : trigger.new){
  //When deleting Campaigns
    for(Campaign p : trigger.old){
  //Map will contain one Contact Id to one sum value
  map ContactMap = new map ();
  //Produce a sum of Campaigns and add them to the map
  //use group by to have a single Contact Id with a single sum value
  for(AggregateResult q : [select Contact__c,sum(Amount__c)
    from Campaign where Contact__c IN :ContactIds group by Contact__c]){
  List ContactsToUpdate = new List();
  //Run the for loop on Contact using the non-duplicate set of Contact Ids
  //Get the sum value from the map and create a list of Contacts to update
  for(Contact c : [Select Id, Total_Campaigns__c from Contact where Id IN :ContactIds]){
    Double Campaignsum = ContactMap.get(c.Id);
    c.Total_Campaigns__c = Campaignsum;
  update ContactsToUpdate;

This is actually code from http://www.anthonyvictorio.com/salesforce/roll-up-summary-trigger/ that I have manipulated to try and create a RUS function on the Contact object to count the Campaigns they are added to. Clearly I am not a developer or I would understand why the error is throwing for me.


Error: Compile Error: expecting a semi-colon, found 'ContactIds' at line 4 column 6  

I need assistance creating a trigger/class combo that would allow me to send time-dependent email alerts to the Account Owner based on the date value in a Formula (Date) field. Basically, I need the email alert to be sent 14, 7, 3, 1, 0 days before the date value in the formula field only if a picklist field contains a specific value. I realize a workflow rule will not work because there is no update on the record due to the date being a formula field. This formula field date value will change once a month, so the cycle of email alerts will restart each month.


Do I need a single class that runs daily and fires the trigger's email alert when TODAY() is 14 days before, then again when TODAY() is 7 days before, etc.


Or do I need individual classes, one for each planned email alert?


I also need the emails to stop when the action is completed by the Account Owner. But then to start back up when the formula field's date changes.

Scenario: Sales rep must acquire a collection of data from each customer on a monthly basis. Most customers are setup for automatic collection but a subset (defined by a value in a picklist field on the Account record) require a manual extraction. The extraction schedule is a static schedule that all manually extracted customers follow (it changes once per year depending on financial calendar). No matter when an Account becomes a customer, their first manual extraction is due by the next due date on the schedule. So, if an Account becomes a customer on 4/13/2013 and the due dates for extraction are 1/21/13, 2/20/13, 3/22/13, 4/21/13, 5/21/13.... then new extraction records would be created and due on 4/21/13, 5/21/13, etc. through the end of the year.

Basically, if an Account is setup for manual extraction, I need to assess when an extraction is due based on this static schedule. Each extraction requires a set of fields to be completed, so I have extractions setup as a custom object.


How can I:


1.Dynamically create individual Extraction records related to the Account based on the remaining extractions on the current year's schedule.


2. Alert the rep that they need to complete a manual extraction based on the static schedule and thus create an extraction record in Salesforce?

I need to send a weekly email to every Contact Role related to an Account that has a specific Role value, Budget Owner.


I am not sure which is easier to accomplish for this.


1. Write a trigger that fires an email to any Contact Role with the Role = Budget Owner, when a checkbox on the Account is checked.


2. Write a trigger that populates the Contact ID of a Contact Role that has the Role = Budget Owner into a custom lookup field on the Acount and use the lookup field as the recipient for the email.


I am not a developer so please tell me which you think makes more sense from a code/management side, and if anyone has any code similar to what I am asking that I can tweak to make work, I appreciate it.

I currently have a Text field that accepts a tracking number for a shipment. My thought was that I could create a formula field that would look at the format of the tracking number and display the carrier's name. I am stuck in that I cannot use REGEX() for a formula field and I am not sure how to compare the format of the value in the text field to get the Carrier.

Has anyone found this solved elsewhere? I have not yet considered a workflow rule as I wanted to post this first.

Hello All,


Does anyone have any experience implementing delegated authentication SSO where the user logs into their company Intranet, which authenticates them to access their Salesforce.com org without any further login? Is this possible?

For those who have experience with implementing SSO between Salesforce and LDAP, on a scale of 1-10, what would you rate the following:


Level of complexity


Level of technical knowledge required (beyond point-click Admin experience)



And how long do you estimate it takes to complete?


Thank you,



trigger TaskRelatedToOpp on Task (before insert, before update) {

// Goal: Find the opp Stage of the opportunity that a task is related to
// and update the Opportunity_Stage__c field on the task object with the value

// If related to an Opportunity, query to find out the Opportunity number

// Create collection of tasks that are related to an opp (where the opp is listed only once)
    Set<Id> opIds = new Set<Id>();
    for(Task t : trigger.new){
        String wId = t.WhatId;
        if(wId!=null && wId.startsWith('006') && !opIds.contains(t.WhatId)){
    // Pull in opp ids and related field to populate task record
    List<Opportunity> taskOps = [Select Id, StageName from Opportunity where Id in :opIds];
    Map<Id, Opportunity> opMap = new Map<Id, Opportunity>();
    for(Opportunity o : taskOps){
    // Update custom task field with custom opp field
    for(Task t : trigger.new){
        String wId = t.WhatId;
        if(wId!=null && wId.startswith('006')){
            Opportunity thisOp = opMap.get(t.WhatId);
            if(thisOp!=null){t.Opportunity_Stage__c = thisOp.StageName;} 


I just need this to populate the Opportunity_Stage__c field only when the Status is Completed. Thanks.

I know for Apex code, this is a pretty straight forward trigger, but not having any dev experience, I am not clear on how to achieve this.


I have a custom text field on activities called Opportunity Stage (Opportunity_Stage__c). I want this field populated with the current Stage (after insert) of the Opportunity that the task is associated with.

Any help is appreciated!

The end goal is to fire a validation rule without a user having to click Edit and then Save. The action is to "validate" that the record is ready to be submitted for approval. Since I cannot invoke a validation rule through the Submit for Approval button being pressed, I would like for the end users to be able to click a "Validate" button that will edit and save a record in order to check validation. If they invoke the rule, they know they are not ready to submit it and they receive the error message informing them of the fields they are missing. If they dont receive the message, they know they are ready to submit it for approval.

Thanks in Advance.
Does salesforce support public cloud? If not then what type of cloud has been deployed?

If i make Changes to Profiles in Dev sandox how can i deliver it to Production. as i see nothing avaialble in change sets for profiles.

Thank you
  • September 09, 2015
  • Like
  • 0
The following formula works to convert an integer (First_Order_Fcst_Period__c) to a date.  Since we are dealing with fiscal years, with October being the first month of the fiscal year, you will see the calcuation below. 
(If( First_Order_Fcst_Period__c > 9, 
Fiscal_Year_As_Integer__c -1, 
Fiscal_Year_As_Integer__c )) , 
First_Order_Fcst_Period__c ,15)

However, if However, if First_Order_Fcst_Period__c is blank, I am getting is blank, I am getting an error.  I changed my formula to be 
(If( First_Order_Fcst_Period__c > 9, 
Fiscal_Year_As_Integer__c -1, 
Fiscal_Year_As_Integer__c )) , 
First_Order_Fcst_Period__c ,15))

and now I get a compile error.  I suspect it's because First_Order_Fcst_Period__c is rather large

IF(October_Order_Fcst__c > 0 || October_Order_Fcst__c <0,10, 
IF(November_Order_Fcst__c >0 || November_Order_Fcst__c <0,11, 
IF(December_Order_Fcst__c >0 || December_Order_Fcst__c <0,12, 
IF(January_Order_Fcst__c >0 || January_Order_Fcst__c <0,1, 
IF(February_Order_Fcst__c >0 || February_Order_Fcst__c <0,2, 
IF(March_Order_Fcst__c >0 || March_Order_Fcst__c <0,3, 
IF(April_Order_Fcst__c >0 || April_Order_Fcst__c <0,4, 
IF(May_Order_Fcst__c >0 || May_Order_Fcst__c <0,5, 
IF(June_Order_Fcst__c >0 || June_Order_Fcst__c <0,6, 
IF(July_Order_Fcst__c >0 || July_Order_Fcst__c <0,7, 
IF(August_Order_Fcst__c >0 || August_Order_Fcst__c <0,8, 
IF(September_Order_Fcst__c>0|| September_Order_Fcst__c <0,9,Null)))))))))))))

Where is the best way to update this so as not to get a compile error

PROBLEM STATEMENT : When I Clone a ticket and save it, the status of the ticket stays the same. For ex, if i clone a ticket that has the status CLOSED, the new ticket also has the status closed. Now, the person cloning the ticket can change the status manually, but this still leaves a chance for Human errors.

I want a validation rule that should check if the status of the ticket is opened while creating a record.

I tried
IF( AND((BMCServiceDesk__FKStatus__c) != "OPENED",ISBLANK(PRIORVALUE((BMCServiceDesk__FKStatus__c)))), TRUE, FALSE)

I also tried
IF( AND((BMCServiceDesk__FKStatus__c) != "OPENED",ISNULL(PRIORVALUE((BMCServiceDesk__FKStatus__c)))), TRUE, FALSE)

But none of it works. Please help!

Please Explain me with code
How to save inbound Email messages in to Excel

i have a csv file contains 10 rows, i need to store
first 6 rows in one object
next 2 rows in another object
next 2 rows in another object

Please explain with code and Example..

I am the HR Manager for my company and we are running a company wide trailhead challenge.  I would like to be able to post a scoreboard with everyones badges and scores.  Is there a way I can this info from a report???  Or will individuals need to send this info to me?

Thank you! Michele
I have a simple flow in which I want to check whether atleast 2 out of 3 questions are anwered on one screen.Is there a way to check using validation rule in flow? 
I have used the following formula on one of the three fields but its not working.I think for validation rule in flow,the error message is displayed if the formula evaluates to false.Even if I put NOT() before the fields,it doesnt work.Please help.


Here is my flow. its being accessed by a button.User-added image


I have a field which contains Social Security # and in the US it's formated this way: EX: 123-45-7890

Now i need to create a formula field to show only the numbers from that field without any other character like "-"

So result should be ;EX: 123457890

Can anyone pls help me with the syntax?

Thank you in advance
  • September 03, 2015
  • Like
  • 0
I created a Hyperlink formula on the Account object that routes a user to a custom object. with. The problem I am having is trying to auto populated the Account lookup field on the custom object. I can't seem to specifiy the exact Account as I get the error " Error: Multiple items found. Select from drop-down or click icon to refine search"
I have also tried adding  "&CF00N1300000BRtcO_lkid=Id" (to capture Account ID) to the statement but then my Account Lookup field on the custom object comes up blank.

Any thoughts or suggestions???
  • August 18, 2015
  • Like
  • 0

 I gave below condition for lead assignement rule is this correct please suggest me 
( CONTAINS('us:usa:united states of america:united states',TRIM(LOWER(Country))) ) 
&& ( 
(CONTAINS('wy:co:nm:az:id:mt:ut:ak:wa:or:nv:ca:hi',TRIM(LOWER(State))) )
( State = "New Mexico" || State = "California" || State = "Idaho" || State = "Hawaii" || State = "Nevada" ||  
  State = "Colorado" || State = "Washington" || State = "Oregon" || State = "Alaska" || State = "Utah" || State = "Idaho" || 
  State = "Montana" || State = "Wyoming") )

Hi - I need help pushing a field.

I'm trying to push the discount field from my Opportunity Product into a Quote and the Quote line item. I have tried using workflow rules with field updates and it doesn't seem to be working. Any ideas how I can accomplish this?

I'm trying to write a formla for a text field.  We have a "Communication Preference Confirmed" text field that I would like to show "Recieved" if the "Communication Opt In " check box = True OR if the Email Opt Out = True


We would also like the "Communication Preference Confirmed" text field to show "Required" if the "Communication Opt in"  checkbox is blank and the "Email Opt Out" = False

Hello everyone,

I have cases being created from different channels: email to case, web to lead, etc.
These cases are created with a New status, and I would like the case status to change to Opened automatically, when the case is opened for the first time.
Is this possible without programming a trigger? Any suggestions will do.

Thank you.
I have a rule to compare the number of hours being used in a custom object against the number of hours available on another custom object. The number of hours available on the other object is a roll up summary field. If the number of hours being used are less than available, everything works. If the number of hours being used are greater that hours available, the rule works and fires an error. But if the hours being used are exactly = to hours available, the rule is firing a validation error when it shouldn't. See debug code below:

15:20:52.069 (69354942)|EXECUTION_STARTED
15:20:52.069 (69408880)|CODE_UNIT_STARTED|[EXTERNAL]|Validation:Professional_Services_Training_Usage:new
15:20:52.069 (69421708)|VALIDATION_RULE|03d40000000H4xy|Cannot_Exceed_Hours
15:20:52.069 (69666941)|VALIDATION_FORMULA|(Training__r.Hours_Remaining__c - Hours_Used__c)< 0.0|Hours_Used__c=2.0 , Training__r.Hours_Remaining__c=2.0
15:20:52.069 (69675079)|VALIDATION_FAIL
15:20:52.069 (69691504)|CODE_UNIT_FINISHED|Validation:Professional_Services_Training_Usage:new
15:20:52.069 (69696463)|EXECUTION_FINISHED