Skip to main content The last day to register for a Salesforce or Tableau exam is June 30th. Learn more about the new Salesforce certification experience coming July 21st.

Feed

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

In Become an Agentblazer Champion>> Bring External Data into the Contact Page Layout Module >> I'm facing issue in Connect Data Cloud and CRM with Enrichment section. I am unable to choose ExternalReservation object for Data Cloud Object input.  

Kindly help on priority. 

#Trailhead Challenges  #Trailhead  #Agentforce

12 answers
  1. Jun 29, 2:07 PM

    For all who are stuck here I figured this one out... 

    Go to Data Cloud -> Data Model -> ExternalReservation -> Relationships -> Edit 

    Set it up like so: 

    Object: ExternalReservation 

    Field: Contact ID 

    Cardinality: 1:1 

    Related Object: Account Contact 

    Related Field: Account Contact ID 

     

    Enjoy All <3

0/9000

Hello, 

 

I am encountering a critical issue when attempting to invoke an Agentforce action from Apex using the Invocable.Action.createCustomAction() method. 

 

When invoking directly from Developer Console (Execute Anonymous Window), the following Apex code works successfully: 

 

Invocable.Action action = Invocable.Action.createCustomAction( 

'generateAiAgentResponse', 

'AnalyzeTranscriptPrompt' 

); 

 

action.setInvocationParameter('TranscriptText', userMessage); 

 

Map outputParams = action.invoke()[0].getOutputParameters(); 

Map agentOutput = (Map) JSON.deserialize( 

(String) outputParams.get('agentResponse'), 

Map.class 

); 

 

However, the exact same code placed inside an Apex method (e.g., a controller or Aura-enabled class), when invoked from a Lightning component or programmatically, results in the following error: 

 

"status": 500, 

"body": { 

"message": "

Agent invocation failed: \\\"generateAiAgentResponse\\\" isn't a valid action type.

}, 

"errorType": "fetchResponse" 

 

Thank you for your assistance.

0/9000

Cannot build test data for survey objects

Hello All,

I activate survey in my org and now I want to measure NPS depends on these surveys.

So I built a class to measure NPS for whole company, division, NPS based governorate and more.. 

And when I tried to built Test class to deploy it to production it restricted me to build test data on all survey objects,

And always give me the error field is not writeable for each field.  

So now I can't deploy it to prod without the test class.

 

I would be grateful for any solutions :)

 

Code:

// insert new Survey

List<Survey> SurveyTest = new List<Survey>();

SurveyTest.add(new Survey(Name = 'testSurvey1'));

SurveyTest.add(new Survey(Name = 'testSurvey2'));

// insert new SurveyInvitation

List<SurveyInvitation> SurveyInvitationTest = new List<SurveyInvitation>();

SurveyInvitationTest.add(new SurveyInvitation(Name = 'surveyInvitationTest1', SurveyId = SurveyTest[0].Id, ContactId = testContacts[0].Id, ParticipantId = testContacts[0].Id));

SurveyInvitationTest.add(new SurveyInvitation(Name = 'surveyInvitationTest2', SurveyId = SurveyTest[1].Id, ContactId = testContacts[1].Id, ParticipantId = testContacts[1].Id));

// insert new SurveyQuestion

List<SurveyQuestion> SurveyQuestionTest = new List<SurveyQuestion>();

SurveyQuestionTest.add(new SurveyQuestion(Name = 'SurveyQuestionTestNPS1', Type = 'NPS'));

SurveyQuestionTest.add(new SurveyQuestion(Name = 'SurveyQuestionTestNPS2', Type = 'NPS'));

// insert new SurveyQuestionResponse

List<SurveyQuestionResponse> SurveyQuestionResponseTest = new List<SurveyQuestionResponse>();

SurveyQuestionResponseTest.add(new SurveyQuestionResponse(QuestionId = SurveyQuestionTest[0].Id, NumberValue = 9));

SurveyQuestionResponseTest.add(new SurveyQuestionResponse(QuestionId = SurveyQuestionTest[1].Id, NumberValue = 10));

// insert new SurveySubject

List<SurveySubject> SurveySubjectTest = new List<SurveySubject>();

SurveySubjectTest.add(new SurveySubject(Name = 'SurveySubjectTest1', SurveyInvitationId = SurveyInvitationTest[0].Id, ParentId = SurveyInvitationTest[0].Id, SubjectId = testAccounts[0].Id, SurveyId = SurveyTest[0].Id, SubjectEntityType = 'Account'));

SurveySubjectTest.add(new SurveySubject(Name = 'SurveySubjectTest2', SurveyInvitationId = SurveyInvitationTest[1].Id, ParentId = SurveyInvitationTest[1].Id, SubjectId = testCase[0].Id, SurveyId = SurveyTest[1].Id, SubjectEntityType = 'Case'));

 

#Apex #Test Classes #Salesforce Surveys 

11 answers
  1. Today, 10:52 AM

    Indeed, you can't insert records on any Survey object (I checked it on Survey, SurveyResponse, SurveyQuestionResponse only). Then you have 2 hard and winding roads:  

    1. Use repository mocking pattern in your tests 

    2. Use (SeeAllData=true) which in this situation is awful. Easy for dev, hard for DevOps (he/she must create any of those objects manually in prod, using the Survey feature).

0/9000

Hello, I've completed the Bring External Data into the Contact Page Layout lesson however when I go to verify my 100 points, I received the following error message (see screenshot #1). However, it looks like I did set this up in my sandbox (see screenshot #2). Can you please help me resolve this so I can move onto the next lesson? Thank you in advance  

AgentBlazer: Issue With Finding Reservations Related List in Contact Lightning Record Page

 

 

AgentBlazer Training - Reservations.png

 

 

 

 

#Trailhead Challenges

9 answers
  1. Today, 10:51 AM

    Just trying to do this and all I am getting is that it keeps processing. Its a brand new playground from today

0/9000
2 answers
  1. Today, 10:50 AM

    HI @Soumya Gada

     

    I am from the Trailhead Help Team. Can you please confirm if you're still seeing an issue? If yes, please help us with the Trailhead module and share the URL of the unit along with the error screenshot if possible.

     

    Thank you!

    ++TrailheadHelpFollowUp

0/9000
4 answers
  1. Today, 10:50 AM

    Hi @Rehanth Palla

     

    I am from the Trailhead help team. We see that you have completed the 'Build Your First Sales Coach' Project. kindly share the solution that helped you resolve the issue or please make sure to mark the response which helped you to resolve your query as 'Best Answer' so that it might help the fellow Trailblazer's who are facing the similar issue.

     

     Thank you!

0/9000
3 answers
  1. Today, 10:48 AM

    Hi @Sushant Kadam

     

    I am from the Trailhead help team. We see that you have completed the 'Build a Data Model for a Travel Approval App' Project. kindly share the solution that helped you resolve the issue or please make sure to mark the response which helped you to resolve your query as 'Best Answer' so that it might help the fellow Trailblazer's who are facing the similar issue. 

     

     Thank you! 

0/9000

I am doing this trail and I went through the steps on "Set Up Identity Resolution",  however am not able to Run Ruleset. I keep getting the attached error message  

Can't move further with trail Bring External Data into the Contact Page Layout

 

Also I noticed that Ruleset Status keeps buffering next to the word Publishing. I am not able to delete not edit or retrace any steps and it has already been over 8 hours.  

Anyone can help advise me what I can do to move forward and complete this trail? 

 

Very much appreciated in advance. 

 

#Trailhead Challenges

8 answers
  1. Jun 24, 5:40 AM

    Hi Trailblazers,

     

    We sincerely apologise for the inconvenience and delay caused.

     

    The issue has been fixed. However, we recommend you to create a fresh playground org to proceed further with the module. Please ensure to complete all the steps from all units in the new org.

     

    Please navigate to the module, and you should be able to create a new playground org.

     

    If you still see an older playground org connected, please follow the below steps to create a new org.

     

    - Login to your trailhead account.

    - Now go to 'https://trailhead.salesforce.com/users/profiles/orgs' in a new tab.

    - Click on Create Playground & click 'Create'.

    - As soon as the playground gets created, refresh your page and you should be able to click Disconnect next to the Data Cloud org (Starting with epic..)

     

    Thanks for your understanding.

0/9000

I am trying to create a roll-up of the number of events on a lead before it is converted. So the roll-up needs to only run for records where the parent object (lead) has IsConverted = false. Is it possible to filter the roll-up for parent object record fields not just those on child object records? 

 

Thank you in advance! 

0/9000