• gaurav gupta 253
  • 5 Points
  • Member since 2019

  • Chatter
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 0
  • 13
  1. On the Product Object, I have a picklist field: Eligible for Commission (Yes/No).
  2. On the Opportunity Product, I would like to add a field called: Eligible for Commission.
If the product (parent) says eligible for commission “YES”, this value should appear on the opportunity product (child).

I’ve tried using a formula field to map the value and it worked! The problem is that I need to create a roll-up summary field that says: SUM of opportunity products where Eligible for Commission equals “Yes”.
I cannot filter by the Eligible for Commission field because it is a formula field. I also tried creating a workflow rule and a text field. I was able to filter by the text field on the roll-up summary field, but the workflow rule won’t successfully update the child record based on the parent (only the other way around).

I'd prefer to stay away from creating a process builder, if possible. Sometimes, when Salesforce releases updates, the process builders just stop working suddenly. Any advice would be helpful. Thank you!
Hi Team,

I have two fields Reason(Text field) and Approved date field on Quote Line object. The Reason field is made Read-Only on page layout. I have a requirement where in the Reason field should ONLY become Editable whenever the Approved date field is changed. Could you please help me in this.

I'm working on integration from SF to Odessa LeaseWave. We have some Picklists that aren't matching up perfectly so I have created some "translator fields" so we can translate our picklists items to fit with picklist items. We've found another one where we have discrepancies. We don't want to change our fields because we count on that data and they don't want to change theirs either. 
I'm wondering if there is another way / a better way of doing this?
The requirement now is to add gray indicator if the ROI months are greater than 36.
Red for greater than 24 but less than or = 36 months.
Yellow for greater than or = to 13 but less than 24 and green for less than 13.

Gray >36
red 25-36 months
yellow 13-24 months
green 1-12 months

ROI_No_of_Months__c  < 13,
IMAGE("//c.na139.content.force.com/servlet/servlet.FileDownload?file=0154W00000BiFeo", "green", 30, 30),
ROI_No_of_Months__c  >= 13,
ROI_No_of_Months__c  <= 24
IMAGE("//c.na139.content.force.com/servlet/servlet.FileDownload?file=0154W00000BiFee", "yellow", 30, 30),
ROI_No_of_Months__c  >= 25,
ROI_No_of_Months__c  <= 36
IMAGE("//c.na139.content.force.com/servlet/servlet.FileDownload?file=0154W00000BiFej", "red", 30, 30)
ROI_No_of_Months__c > 36, 
IMAGE("//c.na139.content.force.com/servlet/servlet.FileDownload?file=0154W00000BiFlp", "gray", 20, 20), 
Hi All,

Need a help,

1) want to run the class from 8 Am to 2 PM everyday
2) and want to run the class from 5PM to 3 AM Everyday.
any ideas on cron expression. 


I'm trying to implement an APEX trigger on the Case object to automatically assign an Entitlement to the case when it is created via email-to-case.
I found a lot of sample codes but none of them is working for me.

Although I created an account and a contact belonging to it, when I create a new case per email in the trigger I always get null for the AccountId. 
Surprisingly when I open the case I can see the correct contact and account on it.

This is the code:
trigger DefaultEntitlement on Case (Before Insert, Before Update) {
set<id> contactIds = new set<id>();
set<id> acctIds = new set<id>();
For(Case c :trigger.new) {
    system.debug('--- Contact id: '+c.ContactId);
    if(c.ContactId != null) {
    system.debug('--- Account id: '+c.AccountId);
    if(c.AccountId != null) {
    List <EntitlementContact> entlContacts = 
                [Select e.EntitlementId,e.ContactId,e.Entitlement.AssetId 
                From EntitlementContact e
                Where e.ContactId in :contactIds
                And e.Entitlement.EndDate >= Today 
                And e.Entitlement.StartDate <= Today];
            for(Case c : Trigger.new){
                if(c.EntitlementId == null && c.ContactId != null){
                    for(EntitlementContact ec:entlContacts){
                            c.EntitlementId = ec.EntitlementId;
                            if(c.AssetId==null && ec.Entitlement.AssetId!=null)
        } else{
            List <Entitlement> entls = [Select e.StartDate, e.Id, e.EndDate, 
                    e.AccountId, e.AssetId
                    From Entitlement e
                    Where e.AccountId in :acctIds And e.EndDate >= Today 
                    And e.StartDate <= Today];
                for(Case c : Trigger.new){
                    if(c.EntitlementId == null && c.AccountId != null){
                        for(Entitlement e:entls){
                                c.EntitlementId = e.Id;
                                if(c.AssetId==null && e.AssetId!=null)

In the debug log I have the following:
18:30:12:112 USER_DEBUG [5]|DEBUG|--- Contact id: 0030X00002NbGx4QAF
18:30:12:113 USER_DEBUG [10]|DEBUG|--- Account id: null

Also, if I add the Entitlement to the contact then it gets assigned correctly, but I do not want to link the Entitlements to contacts (only to accounts)
I need help with creating a validation rule around the opportunity stage please.  We have 4 stages in our org
  • Opportunity
  • Opportunity - quoted
  • In for quarterly target
  • Won
At this moment, sales managers can select 'In for quarterly target'  without the 'Opportunity - quoted' stage being selected, they can skip the quote stage altogether. 

What I need to do is add a rule where the guy cannot jump to 'In for quarterly target' without the opportunity previously having being set as 'Quoted' and ideally have a check for a CPQ record also. 

I have the below, which partially works, although when I save the Opp record as 'Quoted' and then try to save it as in for target, it throws me the same errror. Somethings wrong.... any ideas whats wrong with the below?

TEXT(PRIORVALUE(StageName)) <> 'Opportunity - quoted',
TEXT(StageName) = 'In for quarterly target'
Hi Team,

We have an integration with a legacy system from Salesforce. Part of the requirement, if there is a change in the GlobalValueSet ( Pick list Value Set) related values then that change must be identified and notified to legacy system.

Part of it we developed a custom solution, but we need to know th e'LastModifiedDate' of the individual picklist value of a Picklist Value Set.

Could someone help me to get the last modified date of each entry in Picklist Valueset.


I have  a custom object  called Issue , Following fields  Issue assigned to its a pick list values with user names only Like Kiran , Kumar , Sundar and I have another picklist called Issue Type Picklist should be fired to indivdual user based on the Picklist value example if issue type equals not working broad band Issue that email should be sent to the user.

I know that by making the assigned to picklist can be changed to user look up but the problem here is I already have a user look up named as encountered by , so when ever i am trying to send email notification its not taking the email address of the user look up  so tats one of my concern

can anyone suggest a email notification should be fired based on the pick list to the indival user 


I am trying to write formula criteria to trigger an email from process builder if the fields are miss matched.

I have two fields (picklist) [Entitlement].Cloud_Services_Routing__c & Managed_Service__c(Checkbox).

I would like to trigger an email from process builder when the below criteria is met.

If the value of “Cloud Services Routing” is “Y” and “Managed Service” is not checked
If the value of “Cloud Services Routing” is (“N” or blank/null) and “Managed Service” is checked

Can you please help me to build a formula so that I can use it to trigger the email.

Thanks in Advance!