Skip to main content Take our 5-minute Community Survey. Open now through 4/11/2025. Click here to participate.

Feed

Connect with fellow Trailblazers. Ask and answer questions to build your skills and network.
Hi,

I'm exploring fflib_SObjectDomain (Domain Pattern) :

https://github.com/apex-enterprise-patterns/fflib-apex-common

I'd like to understand the origin of this particular code (from fflib_SObjectDomain class, line )  :

if (System.Test.isRunningTest() & Test.Database.hasRecords())...

Where does Test.Database.hasRecords() come from ?

I can't find any reference. For instance, Test.isRunningTest() comes from Test Class (https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/apex_methods_system_test.htm).

I have looked for any other classes in fflib-apex-common but didn't find any reference.

System.Test.isRunningTest() can be called from anonymous window in devloper console. Not Test.Database.hasRecords()

I've looked inside fflib_SObjectDomain class but I don't find any method or property...

Any idea ?
2 answers
  1. Today, 11:42 AM

    Hi Pascal, 

     

    The 

    Test

    property is referring to a public static property of type

    TestFactory

    in the 

    fflib_SObjectDomain

    class. 

     

    The 

    TestFactory

    class has a property called

    Database

    of type

    MockDatabase

    and this class has a public method that returns boolean as shown below.

    public Boolean hasRecords()

    {

    return records!=null && records.size()>0 || oldRecords!=null && oldRecords.size()>0;

    }

    The code you are referring to is calling this method.

0/9000

I'm working on "View External Services Actions in Flow" part of the "Access External Business Actions" lesson and even though I've completed step 1, External Services doesn't appear in the list. Any ideas? Thanks! 

No

 

 

 

#Trailhead Challenges

3 answers
  1. Today, 11:37 AM

    Hi Ajaypreet, 

        Unfortunately, 'BankService' does not appear there either.  

    Lee

0/9000

Once a support agent has resolved a case, the case is closed, and an email is sent to the client informing them of the successful resolution and closure. In this email, I would like to include a feedback link for the client, asking for their thoughts on the overall case resolution. 

 

To achieve this, I have created a record-triggered flow that sends the email once the case status is updated to "closed." Additionally, I have developed a screen flow to collect feedback. However, I need assistance in creating a link to the feedback screen flow that can be embedded in the email. This link should direct the client to the screen flow rather than to the organization’s homepage.

1 answer
  1. Sushil Kumar (UKG) Forum Ambassador
    Today, 11:20 AM
    If your users use experience cloud, you can embed this flow in an experience cloud page and send link to that page to user’s in email. Once they click on link, they will have to authenticate and then it should open that page after authentication.
0/9000

Would anyone have a reference of mock questions for CRM A certification exam from ExamTopics (https://www.examtopics.com/exams/salesforce/certified-tableau-crm-and-einstein-discovery-consultant/view/

) ?  

It seems to have a list of 120+ questions but it is paid. Would appreciate if someone could help with a set of mock questions. 

@* CRM Analytics (fka Tableau CRM) *

0/9000

Once a support agent has resolved a case, the case is closed, and an email is sent to the client informing them of the successful resolution and closure. In this email, I would like to include a feedback link for the client, asking for their thoughts on the overall case resolution. 

 

To achieve this, I have created a record-triggered flow that sends the email once the case status is updated to "closed." Additionally, I have developed a screen flow to collect feedback. However, I need assistance in creating a link to the feedback screen flow that can be embedded in the email. This link should direct the client to the screen flow rather than to the organization’s homepage.

0/9000

Good Day colleagues, 

 

I am in the process of doing an audit for a client.  Since this is a new client, and we have done simple audits before, I was wondering if there is a process / resource / documentation to assist in performing this audit.  It is an established client. 

 

Thanks in advance

4 answers
0/9000

HI, Can anyone please tell what is the error and solution. 

 

Review the errors on this page.

  • dlrs_caseman_IntakeTrigger: execution of AfterUpdate caused by: System.DmlException: Update failed. First exception on row 0 with id 0014x000022iCTyAAM; first error: INVALID_CROSS_REFERENCE_KEY, invalid cross reference id: [] (dlrs) Trigger.dlrs_caseman_IntakeTrigger: line 7, column 1

 

Scenario:

 

I recently refreshed the Partial sandbox and working on some updates there, so I can later deploy them into production.  

I am having DLRS in my org, and on Intake object, I have a field that is a lookup to user. I am trying to change the name of the user there and selecting another active user and getting this error. Could anyone assist me that what to check and where? 

Note: I am an admin and not a developer, so please guide me by keeping this in mind. Thank you in advance!

2 answers
  1. Today, 10:49 AM

    Taking a guess here. When you create a partial Sandbox you pick and choose data to bring with you. It is possible to choose child objects without the other side of the lookup. Salesforce with still leave the parent id value on the child even though that record never made it through to the sandbox.

    That could easily be what is happening here, your record has a lookup pointing to a record that doesn’t exist.

0/9000

We know that when the Renewal Forecast field on a Contract is set to TRUE, Salesforce CPQ automatically creates a Renewal Opportunity, unless one is already specified in the Renewal Opportunity field on the Contract. To facilitate price calculations, Salesforce CPQ also generates temporary "ghost" Quote and Quote Line records. At the end of the process, these temporary records are deleted, leaving only the Opportunity and Opportunity Product

records.  

 

Problem: 

We have custom Apex logic that executes after a Quote is inserted. However, this logic also runs on ghost Quote

records, which are ultimately deleted.  

 

Question: 

How can I determine if a Quote is a ghost record to prevent the logic from running on these temporary records? 

4 answers
0/9000
Hi! I am struggling to either search correctly or configure this correctly.

 

I have a junction object between Accounts and a custom object. Everything is working correctly, but graphically it is not intuitive.

 

When someone creates the relationship and views in on the Accounts Related List, they see the 'Name' of the junction object and not the related object. I would like to display the Name or other fields on the custom object instead of the junction object name.

 

Is this even possible or am I missing something??

 

Thank you!

 

Jeremy
6 answers
  1. Oct 11, 2019, 1:54 AM
    I see what you mean now Jeremy.  If you go to your account object page layout and edit the junction object related list you can choose which fields are displayed in the list, just remove the junction object name and replace it with the Lookup field to your custom object

     

    I see what you mean now Jeremy.
0/9000

Hello Everyone,  

I have just completed my Ranger Rank and Road to Ranger Quest April 2024 to get the Trailblazer Hoodie.  

Road to Quest trailmix : https://trailhead.salesforce.com/users/teamtrailhead/trailmixes/quest-road-to-ranger-april-2025

 

Do I get notified about receiving the hoodie?  

 

Can anyone tell me what is the exact process to get the Hoodie. 

 

#TrailblazerCommunity  #Trailblazer Hoodie  #Trailhead Rangers

0/9000