Thursday 23 March 2023

Health Cloud Specialist Superbadge

Health Cloud Specialist Superbadge

Challenge 4:
  • Create record type on Person Account Object.
  • Configure Custom record type for individual. Create a new record in custom metadata with name "Individual Record Type Mapper". This is an existing metadata custom setting. See below screen shot. 
  • Make sure you selected Console navigation as the Navigation Style when creating the app.
  • Create patient record in account object.


https://developer.salesforce.com/docs/atlas.en-us.health_cloud.meta/health_cloud/admin_config_custom_record_type.htm?search_text=configure%20custom%20record&_ga=2.109255109.1551928910.1679425307-1666235364.1662575682

Error:
If facing this error "We could not find the Patient record type correctly configured under Custom Metadata Types".
Check if you have same name record type on any other object if yes deactivate that.
https://trailhead.salesforce.com/de/trailblazer-community/feed/0D54S00000CfOToSAN

We cant find the expected tabs in the care coordination console app.

I had the same error. Please check all tabs in navigations items in your app. There are two "Home" items.   You should add home page with the pink house icon. And also there are several patients - you need to add Patient tab with lightning icon. 
https://trailhead.salesforce.com/ja/trailblazer-community/feed/0D54S00000FSVmRSAX

Challenge 5:
  • Go on care plan template tab and create a new care plan template with name "Diabetes Care Plan Template".
  • Enter new care plane template problems
  • Enter Goals under care plan template
  • Create another care plan template "Care Plan Template for Nutrition Education" with problem mentioned in task
  • From Setup, enter Custom Settings in the Quick Find box and select Custom Settings.
  • In the list of custom settings, click Manage next to Health Cloud Feature Toggles.
  • Click Edit next to Multiple Care Plans and select the Enabled checkbox.
  • Click Save
  • Household record is already exists with name Suman Household. Just add shankar as patient in that household.
https://trailhead.salesforce.com/ja/content/learn/modules/health-cloud-care-plans/set-up-care-plans

Error:
We can’t find the 'Diabetes Education' case team.

On the Case Team, make sure that Adam is listed first and Martha is listed second. I had to delete Martha, save it, and then add her back on. Then remove the Case team from both of Shankar's Care plans. Refresh the page and add them back on. I was able to clear the error and pass the challenge after that. 
https://trailhead.salesforce.com/ja/trailblazer-community/feed/0D54S00000FSG9O

Challenge 6:

  • Go to timeline view configuration object and create one record in it as per screen shot.
  • Then go to all list view of timeline view configuration object and activate all existing time line view.

  • Enter data in each of the object as per instructions
    • Clinical Encounters
    • Health Conditions
    • Medication Statement
    • Patient Immunization
    • Diabetes Coaching Session
  • Enter some random data in these object and link to shankar
    • Contact Preferences
    • Medications
    • Conditions
    • Insurance Plan
    • Member Id
    • Allergies
  • Create spouse link and other user relation.
  • Create care Care Intervention Type(go to tab and click new)


Error:
  1. We can't find the patient card configured according to the requirements.

Make sure you created a new Patient Card Configuration record using the Health Condition object. In order for the conditions to show in the card, you need to populate the Override Filter Field on the configuration record with a field from the Health Condition object that returns true or false. Consider creating a new field on the Health Condition object (optional), like the other objects that show in the card.

  1. We can’t find the Patient Timeline with the correct configuration.
Make sure you see all the data in patient timeline.
https://trailhead.salesforce.com/ja/trailblazer-community/feed/0D54S00000Gh9h3

  1. We can’t find 'Anna Jones' under Related Contacts for 'Shankar Suman', or we can’t find the expected reciprocal role
Please make sure that you are trying to verify the correct dev org if you have more than one. For me, it looks all good now. If you are still getting the error, please submit a case to Trailhead support, and they can assist further.
https://trailhead.salesforce.com/ja/trailblazer-community/feed/0D54S00000FVs5zSAD

  1. We can’t find an account named 'Get Cloudy Health Cloud Super Badge...Consulting' under Related Accounts for 'Shankar Suman', or we can't find the expected role.
https://trailhead.salesforce.com/ja/trailblazer-community/feed/0D54S00000ElwUY






Tuesday 24 January 2023

Platform Developer I Certification Maintenance (Winter '23)

First Challenge 

Second Challenge

@isTest

private class DataGenerationTest {

  @testSetup

  static void dataCreation() {

      Account account = TestFactory.getAccount('Muddy Waters Inc.', true);

      Contact contact = TestFactory.getContact(account.Id, 'Muddy', 'Waters', true);

      Opportunity opp = New Opportunity();

      opp.Name = 'Long lost record';

      opp.AccountId = account.Id;

      opp.CloseDate = Date.today().addDays(14);

      opp.StageName = 'Prospecting';

      insert opp;

  }

  @isTest

  static void testBruteForceAccountCreation() {

      List<Account> accts = new List<Account>();

      Test.startTest();

          accts = [SELECT Id FROM Account];

      Test.stopTest();

      Assert.IsTrue(accts.size() > 0, 'Was expecting to find at least one account created on the Test Setup');

  }

  @isTest

  static void testUseTestFactoryToCreateAccountsWithContacts() {

      List<Account> accts;

      List<Contact> contacts;

      TestFactory.generateAccountWithContacts(5);

      Test.startTest();

          accts = [SELECT Id FROM Account];

          contacts = [SELECT Id FROM Contact];

      Test.stopTest();

      Assert.IsTrue(accts.size() > 0, 'Was expecting to find at least one account created');

      Assert.IsTrue(contacts.size() == 6 ,'Was expecting to find 6 contacts');

      Assert.areNotEqual(accts.size(), contacts.size(), 'Was expecting there to be a different number of account and contacts');

  }

  @isTest

  static void testAtTestSetupMethodsRule() {

      List<Opportunity> opps = [SELECT Id, AccountId FROM Opportunity];

      Assert.areEqual(1,opps.size(), 'Expected test to find a single Opp');

  }

}

Sunday 1 January 2023

Copado Certification Maintenance - Fundamentals 1

 Q1. When working with second generation packaging  you can:

    a) Manage package creation, publishing, and distribution from copado UI.

    b) Start using the default rules and code analysis while creating the package version.

    c) Deploy metadata from one salesforce org to another without having to build a new change set.

    d) Integrate critical industry-followed DevSecOps tools.

Answer: Manage package creation, publishing, and distribution from copado UI.

Q2. Which of the following are the improved capabilities of copado CI/CD for second generation?

    a) Leverages source format support.

    b) Provides access to logs and more details executed logic.

    c)Leads to greater stability and authorize further customization.

    d)All of the above.

Answer: All of the above.

Q3. What should you check if you cannot see the Rollback button on your promotion record?

    a) If the rollback feature is enabled in the destination org.

    b) If your profile is assigned the correct license to use the Rollback feature.

    c) If the rollback option is marked as selected in your promotion.

    d) If your user story qualifies to avail of the rollback feature.

AnswerIf the rollback feature is enabled in the destination org.

Q4. What is the user of Review Merge Conflict feature in Copado?

    a) To change the conflict resolution strategy and redeploy your changes.

    b) To review the conflict and stop the promotion until the conflict is resolved.

    c) To let copado know that a particular user story requires an auto resolve.

    d) To review user stories potentially conflicting with your current user story.

Answer: To change the conflict resolution strategy and redeploy your changes.

Q5. If your package is in the beta stage, you can distribute it to non production environments only.

    a) true

    b) false

Answer : False

Q6. Which feature enables you to ensure that when you select a child metadata, the parent element nested metadata is also selected?

    a) Commit, Promote, and Deploy flow of copado CI/CD for salesforce 2nd generation.

    b) Commit, Promote, and Deploy copado classic.

    c) Commit, Promote, and Deploy copado DevOps platform.

Answer : Commit, Promote, and Deploy flow of copado CI/CD for salesforce 2nd generation.

Q7. Which of the following tools can be integrated with copado as quality gate?

    a) Copado Continuous Delivery

    b) Copado Robotic Testing

    c) Copado DevOps Platform

    d) Copado CI/CD for salesforce 2nd Generation

Answer:  Copado Robotic Testing

Q8. From the promotion record how can you auto resolve conflicts for multiple user stories?

    a) Select user stories with conflicts and promote them to the next environment. Copado will detect and the resolve the conflict.

    b) Select the auto resolve conflict button in the promotion record and resolve the conflict automatically.

    c) Determine the overlap between the user stories and select the user stories with conflict only for copado to auto resolve the conflict.

    d) Conflicts can not be resolved automatically for multiple user stories. It can only be resolved manually.

Answer: Determine the overlap between the user stories and select the user stories with conflict only for copado to auto resolve the conflict.

Q9. Which copado solution enables you to deploy metadata changes from salesforce org to another without building a new change set?

    a) Copado Continuous Delivery

    b) Copado Essentials

    c) Copado Robotic Testing

    d) Copado CI/CD

Answer: Copado CI/CD

Q10. Which of the following options has been added to the result record for troubleshooting?

    a) View result option.

    b) Logs option in the result record

    c) Status option the result record.

    d) All of the above.

Answer: All of the above.

Wednesday 13 January 2021

Salesforce Designer Certification Maintenance (Winter '21)

 A company needs to automatically upsert between 4.5M to 5.5M cases every other day. What implementation should a Salesforce architect recommend to meet these requirements?


  • Schedule the case upsert every other day using Data Loader.
  • Schedule the case upsert every other day using the Data Import Wizard.
  • Schedule an external service every other day to upsert cases using Bulk API 2.0.
  • Schedule an external service every day to upsert cases using REST API.
Answer: 
Schedule an external service every other day to upsert cases using Bulk API 2.0.

An architect has developed a custom application that uses Bulk API 2.0 to extract data from one of their Salesforce orgs. The data for a new object, Phone_Book__b, needs to be included as well. 
How should the architect meet this new requirement?

  • Create a new custom application and use Async SOQL to extract Phone_Book__b.
  • Create a new custom application and use Bulk API 1.0 to extract Phone_Book__b.
  • Update existing custom application to extract Phone_Book__b.
  • Update custom application to Async SOQL to use extract Phone_Book__b.
Answer: 
Update existing custom application to extract Phone_Book__b.

What should a Salesforce architect recommend to secure traffic between a Salesforce org and Amazon Web Services (AWS)?

  • Setup IP restrictions with outbound and inbound firewall rules.
  • Setup salesforce connect and AWS virtual private cloud.
  • Setup remote site settings with outbound and inbound firewall rules.
  • Set salesforce private connect and an AWS virtual private cloud.
Answer: Set salesforce private connect and an AWS virtual private cloud

A corporation is growing its service department from 100 employees to 300. 
Each service user has five different permission sets assigned to them. 
What should an architect recommend to facilitate the assignment of these permission sets to the new employee?

  • Create a permission set group that includes the five permission sets and assign it to all 300 users.
  • Assign each induvial permission set to all 200 new users.
  • Create a new service profile from the existing five permission sets and assign it all 300 users.
  • Create a new service profile from the existing five permission sets and assign it all 200 users.
Answer: 
Create a permission set group that includes the five permission sets and assign it to all 300 users.

Service managers and service representatives are assigned different permission set groups (PSGs). Both PSGs contain the permission set Survey Creator. What should an architect recommend if they no longer want service representatives to delete surveys?

  • Create a new permission set for service mangers and edit the survey create permission set to remove delete capabilities.
  • Create a muting permission set suppressing delete capabilities and assign to service rep PSG.
  • Create a new permission set for service rep omitting the delete functionality.
  • Create a muting permission set suppressing delete capabilities and assign to service Manager PSG.
Answer:
Create a muting permission set suppressing delete capabilities and assign to service rep PSG.

A security department requests that all personally identifiable information (PII) in full Salesforce sandboxes be obfuscated. There are 13M records with PII affected. 
What should a Salesforce architect recommend to meet these new security requirements?

Answer: Salesforce data mask in production and then refresh the sandbox

A company is preparing for the new Salesforce release and wants to start training its users on the new features yet to be in production. 
What can a Salesforce architect recommend in order to quickly give users access to a new preview instance?

Answer: Create a new sandbox by cloning a preview instance.

When Salesforce is configured as an identity provider, what can be applied to secure its messages to the service provider?

Answer: single algorithm




Saturday 26 December 2020

Platform App Builder Certification Maintenance (Winter '21)

 Where should an app builder go to analyze performance on a Lightning record page?

  1. Lightning App Manager
  2. Lightning Object Manager
  3. Lightning App Launcher
  4. Lightning App Builder

Answer : Lightning App Builder

What field is updated when deploying sharing settings simultaneously?

  1. Sharing Criteria Rules
  2. Sharing Models
  3. Criteria Items
  4. Owner Rules
Answer: Sharing Models

What should an app builder use to build a collection of records for three different custom objects?

  1. Use a reusable screen Component
  2. Create a custom Component
  3. Clone a Screen Component
  4. Use Loop Component

Answer: Use a reusable screen Component

An app builder received feedback that a custom page layout has too many fields on it, and some fields are only needed if other fields are entered. What should an app builder configure to help with this issue?

  1. Dependent picklist
  2. Lightning Web Component
  3. Dynamic Forms
  4. Separate page layouts & record types
Answer: Dynamic Forms

What type of flow is available for an app builder to debug as another user?

  1. Invocable process
  2. Screen Flows
  3. Platform Events
  4. Record Change Process
Answer: Screen Flows


Platform Developer I Certification Maintenance (Winter '21)

 How can a suspended event be resumed where it left off, to avoid missing any events that were published during the suspension?

  1. Refresh the Event
  2. Resume the Event
  3. Resume the Event from New 
  4. Resume the Event from Tip
Answer: Resume the Event

Which statement is true regarding events configured with the Publish Immediately behavior?

  1. Publish immediately Events count towards Apex DML limits
  2. EventBus.publish() returns how many platform events are configured to publish immediately.
  3. The events are published and do not depend on the successful completion of the transaction.
  4. Events published immediately prevent Apex callout from being performed after publishing.

Answer: The events are published and do not depend on the successful completion of the transaction.

What is the minimum code coverage requirement in order to promote and release an unlocked package?

  1. 70%
  2. 75%
  3. 85%
  4. 90%

Answer: 75%

When using WITH SECURITY_ENFORCED in a SELECT clause, what happens if a field referenced in the clause is inaccessible to the user?

  1. The query succeeds, but no data returned.
  2. The query succeeds, and null data set is returned.
  3. The query fails with an error indicating no access allowed.
  4. The query throws an exception indicating insufficient permission and no data is returned.

Answer: The query throws an exception indicating insufficient permission and no data is returned.

A developer wants to send a custom notification when an important event occurs. What can the developer use?

  1. Messaging.Custom Notification Class
  2. Messaging.Push Notification Class
  3. Messaging.Notification Action Class
  4. Messaging.Send Notification Class

Answer: Messaging.Custom Notification Class

A developer wants to check whether a user has a standard permission. Where should the developer import Salesforce permissions from in order to check this?

  1. @salesforce/hasPermission
  2. @salesforce/customPermission
  3. @salesforce/userPermission
  4. @salesforce/customPermission/namespace

Answer: @salesforce/userPermission

When does Salesforce plan to enforce the removal of instance names from all Visualforce URLs?
Answer: Summer 22
What is a current use case for incorporating the @track decorator in a field of a Lightning web component?
Answer: To observe changes when the field contains an array

What is the default behavior of the Lightning message service scope parameter?

  1. Active area Only
  2. Entire application
  3. Publisher message channel
  4. Active area and all hidden tabs

Answer: Active area only

HandsOn 


Updated Code of class

@RestResource(urlMapping='/apexSecurityRest')
global with sharing class ApexSecurityRest {
    @HttpGet
    global static Contact doGet() {
        Contact result;
         Id recordId = RestContext.request.params.get('id');
    
          List<Contact> results = [SELECT id, Name, Title, Top_Secret__c, Account.Name FROM Contact WHERE Id = :recordId];
          SObjectAccessDecision securityDecision = Security.stripInaccessible(AccessType.READABLE, results);
          
           SObjectAccessDecision securityDecision2 =
       Security.stripInaccessible(AccessType.UPDATABLE,
             [SELECT Description FROM Contact]
             );
             result.Description = result.Account?.Name;

           return result;
      }
      public class FunctionalException extends Exception{}
      public class SecurityException extends Exception{}
}

Thursday 24 December 2020

Salesforce - Sending Surveys to Customer using Salesforce Survey

 Salesforce Survey

In order to use salesforce surveys, org must have salesforce surveys enabled. Salesforce gives us previlage to send surveys to employees and to user outside of company. In this post I will explain how we can send surveys to contacts outside of company without using code.

In order to achieve this we will use following things
  1. Salesforce Surveys
  2. Community
  3. Flow
  4. Email template
  5. Process Builder

Survey

Make sure your salesforce org has lightning turned on as salesforce survey object is accessible in lightning only. In order to access salesforce survey tab you can access it from both lightning and classic.
 Go in setup search and write down survey. Click on survey settings and make sure you turned on survey from here. Later in this post we will create a community to select here.
Now select salesforce survey from lightning tabs and click new and create a survey. Select name as surveys for customers. Add some text on survey welcome page. Something like that

At Universal Container we are committed to providing our customers the best technical support and service. Please take this brief two-minute survey about your recent contact with our Technical Support Staff.

Add next page and click on page and click on Add Question button and select NPS to add on your page. Enter below text as question




How likely are you to recommend our service to a friend or colleague?

Add below text on thank you page

Thank you for taking the survey. Your feedback is important to us

Click save and then click activate button. If you want to update this survey you have to create a separate version.

Survey Invitation

Go in survey invitation object and create a custom field email. This field will be used to send surveys to emails.

Community

Now we will create a community which will be used as a bridge to send surveys to contacts outside of our company.
Go in setup search and write all communities. Click on All communities and then create a community by clicking button new community.
Select build your own and then click Get Started. Enter name "Survey" and url survey and click create.

It will take few minutes for system to create your community.
Now go back into survey settings and select this community 

Flow

In order to launch surveys automatically we will be using lightning flows. When a case is closed we will automatically launch a flow. Go in the setup search and write down flow. Click on flows under process automation heading. Click new flow button and select record triggered flow.

Now select when record is updated then select objects is case and then put condition status equal to closed.
Now drag get records to get community information. We need community information create survey invitation data.
Add condition community name = survey
Now use get records to get survey record id.

Drag create record and now create a record for survey invitation object with below mapping

community id = community id
Survey id = survey id
Email = Contact email
Allow guest user response = true
Invitation name = test




Now add an action. select email send. Add email alert name and select survey invitation record id in related record id option.

In order to make sure you only send one survey per case update case with the check box survey send = true in the end of flow.
Now activate your flow.

Publishing Community

Now go back into setup and select all communities and then click builder in front of your community name.
Click on components and type survey in search box. drag and drop survey component on front page and then select your survey on it.
Now go in community profile and make sure that community profile have cru right on survey, survey invitation and survey response object.
Now mark your community as public and then publish it.



Email Template

Create an email template with below wording and create take survey link like this
Community Url/runtimeApp.app?invitationId={!SurveyInvitation.Id}&surveyName={!SurveyInvitation.Name}&UUID={!SurveyInvitation.UUID}


Process Builder


In order to stop contacts filling survey multiple times you can create a process builder on survey invitation object. Select when record is created or updated.
In condition select status ischanged = true and status = completed in action use immediate action and mark allow guest response to false.