• Tommy Sunderland 16
  • NEWBIE
  • 10 Points
  • Member since 2018

  • Chatter
    Feed
  • 0
    Best Answers
  • 1
    Likes Received
  • 0
    Likes Given
  • 5
    Questions
  • 2
    Replies
Hello, I have an involved request that I'm hoping someone can help me solve.
  • On Opportunities we track first response time, calculated by taking Date/Time that the first activity is logged (after the opportunity is created) and subtracting from it the Date/Time that the Opportunity was created. The difference between the two calculates a first response time in minutes.
User-added image
  • The team has asked me to take into account our business hours (9AM - 5PM) in this equation, meaning that if an opportunity is created after 5PM, then the first response time should only be calculated after 9AM the following morning. So an opportunity created at 5:00 PM on a Thursday and responded to at 9:15 AM Friday morning would show a first response time of 15 minutes (and not 960 minutes due to the off hours).
    • Note: our current Default business hours are set to "24 Hours" and not to 9 to 5. We do not have separate business hours set in Salesforce for each office, just FYI
  • Important note: We have multiple offices, so the proposed solution needs to take this into account.
    Is this possible? Would that be via formulas or other declarative solutions? I'm not an experienced developer.

    Additional information:
    • Someone pointed me to this solution, but this appears to account for hours, not minutes. I'm looking for minutes
    • Someone else recommended customizing this package. The package is meant for Cases (I'm dealing with Opportunities). Additionally, I don't have great coding skils and I worry that the appropriate solution using this package may be beyond my skillset. However, I'm open to an advice.
    Thank you!
    I'm trying to create a Visual Workflow + Process Builder that writes the Campaign of which a Lead is a Campaign Member to a custom field on the Lead called Campain_LD_Copy__c. (this is a workaround from this post). I got the Process + Flow to work when a Lead is a Campaign Member of a Campaign, however the Flow fails when the Lead is not part of a Campaign. I thought that adding a Decision node to the Flow could solve for this, but I get an error of "Failed to find records" when the FastLookup tries to find a CampaignMember, and I don't know how to solve for it. 

    The first step in the Flow is a FastLookup for Campaign that matches the LeadId, and this seems to be where it's failing (when no record is found). Is there a better way to approach this? Assuming that if there is then my second step (Decision) may be unnecessary (see 2nd screenshot).

    Step 1: Fast Lookup
    User-added image

    Step 2 (Decision):
    User-added image


     
    Multiple users are getting an error message when trying to save an Opportunity. The message reads "The record you were editing was modified by XYZ user during your edit session". I'm familiar with this error and why it fires when two people are actively editing a record (Collision Detection), but the odd thing is that the other Users were NOT actively editing the same record at the same time. I'm assuming that something in the background is causing this error (Workflow, Process Builder, Flow, etc.), but does anyone know the best way to check this? Is there a way to determine if one of these elements threw the error? Or is there a way to see that user's log history for that time period?

    User-added image
     
    Having an issue getting a very lengthy Validation Rule to run. Please see the following. The short of the long is to only allow Stage to be "Closing - Confirmed" if:
    - Order Process Type is Month to Month 
    - # of Activities > 0 
    - Product selected 
    - App associated to Account 
    - App has CC info 
    - Proper Pricing Model selected 
    - Proper Type selected
    -------------------------------------

    AND( 

    ISCHANGED( StageName ), 
    ISPICKVAL(StageName, 'Closing - Confirmed'), 
    ISPICKVAL(Order_Process_Type__c, 'Month to Month'), 
    Number_of_Activities__c > 0, 

    AND( 
    Purchase_Educate__c = false, 
    OR( 
    ISPICKVAL(Purchase_Engage__c, 'No'), 
    ISBLANK(TEXT(Purchase_Engage__c)) 
    ), 
    OR( 
    ISPICKVAL(Purchase_Resolve__c, 'No'), 
    ISBLANK(TEXT(Purchase_Resolve__c)) 

    ), 
    OR( 
    Account.Apps_With_Credit_Card__c=0, 
    ISNULL(Account.Apps_With_Credit_Card__c) 
    ), 
    OR( 
    Account.Total_Number_of_Apps__c=0, 
    ISNULL(Account.Total_Number_of_Apps__c) 
    ), 
    Account.Number_of_Active_Apps__c > 0, 
    OR( 
    AND( 
    RecordTypeId = "0121N0000012cms", 
    ISPICKVAL(Pricing_Model__c, 'Month to Month (No Base High)'), 
    OR ( 
    ISPICKVAL(Type, 'New Business - Inbound'), 
    ISPICKVAL(Type, 'New Business - Outbound') 

    ), 
    AND( 
    RecordTypeId = "0121N0000012cmn", 
    ISPICKVAL(Pricing_Model__c, 'Per Product Pricing with Seats'), 
    OR ( 
    ISPICKVAL(Type, 'New Business - Inbound'), 
    ISPICKVAL(Type, 'New Business - Outbound') 



    )

    We're trying to do a mass import of Contacts using the Data Import Wizard (to prevent duplicates), but in doing so we had many errors because  we hit governance limits due to an Apex Trigger. I have since deactivated the Apex Trigger in Sandbox by unchecking the "Is Active" checkbox and sent the deactivated Trigger via a change set to the Production Org, but when I try to deploy it in Production, I receive an error that one of the tests has failed (and therefore cannot deploy).

    I'm looking for advice on the easiest/best way to deactivate

    I've included screenshots of the Error Message that I get when trying to deploy below, as well as the original Apex Trigger code. I can send through actual code if needed.

    test failure

    apex trigger code
    Multiple users are getting an error message when trying to save an Opportunity. The message reads "The record you were editing was modified by XYZ user during your edit session". I'm familiar with this error and why it fires when two people are actively editing a record (Collision Detection), but the odd thing is that the other Users were NOT actively editing the same record at the same time. I'm assuming that something in the background is causing this error (Workflow, Process Builder, Flow, etc.), but does anyone know the best way to check this? Is there a way to determine if one of these elements threw the error? Or is there a way to see that user's log history for that time period?

    User-added image
     
    I'm trying to create a Visual Workflow + Process Builder that writes the Campaign of which a Lead is a Campaign Member to a custom field on the Lead called Campain_LD_Copy__c. (this is a workaround from this post). I got the Process + Flow to work when a Lead is a Campaign Member of a Campaign, however the Flow fails when the Lead is not part of a Campaign. I thought that adding a Decision node to the Flow could solve for this, but I get an error of "Failed to find records" when the FastLookup tries to find a CampaignMember, and I don't know how to solve for it. 

    The first step in the Flow is a FastLookup for Campaign that matches the LeadId, and this seems to be where it's failing (when no record is found). Is there a better way to approach this? Assuming that if there is then my second step (Decision) may be unnecessary (see 2nd screenshot).

    Step 1: Fast Lookup
    User-added image

    Step 2 (Decision):
    User-added image


     

    We're trying to do a mass import of Contacts using the Data Import Wizard (to prevent duplicates), but in doing so we had many errors because  we hit governance limits due to an Apex Trigger. I have since deactivated the Apex Trigger in Sandbox by unchecking the "Is Active" checkbox and sent the deactivated Trigger via a change set to the Production Org, but when I try to deploy it in Production, I receive an error that one of the tests has failed (and therefore cannot deploy).

    I'm looking for advice on the easiest/best way to deactivate

    I've included screenshots of the Error Message that I get when trying to deploy below, as well as the original Apex Trigger code. I can send through actual code if needed.

    test failure

    apex trigger code