• Matt Morris 24
  • NEWBIE
  • 0 Points
  • Member since 2018

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 4
    Questions
  • 8
    Replies
I have been configuring the SalesforceLabs Enhanced Data Grid app and its gone well so far. However I am struggling to work out how to pass a value from the parent record into the payload of e.force:createRecord action.

My payload is as follows:
{"entityApiName":"Action__c",
"recordTypeId" : "0124J0000009Y2pQAE",
"defaultFieldValues" : {"Session__c":"#parentrecordId#", "Start_date_time__c" : "#Session__c.In_Form__Start_date_time__c#", "End_date_time__c" : "#Session__c.In_Form__End_date_time__c#"}}
I get the right entity, the right Record Type and the right Session value. However the date/time fields don't get populated.

The user guide has the example of creating a Contact record from the Account parent and it reads...
"#AnyAPIName# - replaced with corresponding value from row (as long as it’s in the fields displayed). Eg #Account.LastModifiedBy.Name#"
Which is a bit confusing because how can the field from the parent object be displayed in the row (which by definition is the child)!

Can anyone help?
I need a Quick Action (for mobile) to create a record of ObjectX from Contact (but ObjectX also has M-D to ObjectY). The user should also be presented with an ObjectX record type selector. Depending on the record type selected the user input screen shows different fields. On creation of ObjectX the user should be returned to the record created (not its parent).

Solution (so far)
Created a Flow which is called by the Quick Action - this presents the user (through a screen) a list of ObjectY records that are related to the Contact. User selects the ObjectY record. On the next screen there is a dynamic choice radio button that uses custom metadata records to indicate which (of the many) ObjectX record types should be available for the user to select.

So now I have the:
- Contact ID;
- ObjectY ID; and
- the desired Record Type ID of ObjectX.

All of this can be done in Flow. My next step is to have another screen that calls a (not yet created) Lightning Component that shows the right user input fields for the right ObjectX record type.

Proposed solution

Create another Custom Metadata object that has 5 fields:
- Label (text) - the name of the record type
- RecordTypeID (text) - the id of the record type
- Fields to Show (text) - a list of the ObjectX field api names seperated with semicolons. This is an ordered list of the fields to show on the input screen for this record type.
- Fields Required (text) - a list of the ObjectX field api names seperated with semicolons. This is a list of the fields that are to be shown that will be required for this record type.
- Fields Read Only (text) - a list of the ObjectX field api names seperated with semicolons. This is a list of the fields that are to be shown that will be read only for this record type.

A Lightning Component will take the 3 IDs from the flow, load the right Custom Metadata record and render the screen.
On save the new ObjectX record will be created and the user will be returned to this newly created record.

I would really appreciate some guidance on how I might create the Lightning Component that will be able to parse the Custom Metadata fields to generate the screen.

Thanks!
I am stuck on challenge 4. Although I have created the 'Load Seed Bank' dataflow (and I believe it is correctly formed) I get the following error:

"Couldn’t find the 'Load Seed Bank' dataflow. Confirm the dataflow matches the name as described in the challenge."

Here you can see a list of my dataflows:

List of data flows including one called 'Load Seed Bank'

Might you be able to help?

I have completed all of the required steps as required. Here is my Transaction Security Policy:

Transaction Security Policy

However when I go to check the challenge I get the following error:

Challenge error

Can someone please help?
 

Thanks

I have been configuring the SalesforceLabs Enhanced Data Grid app and its gone well so far. However I am struggling to work out how to pass a value from the parent record into the payload of e.force:createRecord action.

My payload is as follows:
{"entityApiName":"Action__c",
"recordTypeId" : "0124J0000009Y2pQAE",
"defaultFieldValues" : {"Session__c":"#parentrecordId#", "Start_date_time__c" : "#Session__c.In_Form__Start_date_time__c#", "End_date_time__c" : "#Session__c.In_Form__End_date_time__c#"}}
I get the right entity, the right Record Type and the right Session value. However the date/time fields don't get populated.

The user guide has the example of creating a Contact record from the Account parent and it reads...
"#AnyAPIName# - replaced with corresponding value from row (as long as it’s in the fields displayed). Eg #Account.LastModifiedBy.Name#"
Which is a bit confusing because how can the field from the parent object be displayed in the row (which by definition is the child)!

Can anyone help?
Hi I am doing the Assign Top Leads to Your Sales Rep Trailhead module >> https://trailhead.salesforce.com/trails/learn-admin-essentials/projects/prioritize-leads-with-einstein-lead-scoring/steps/assign-top-leads-to-your-sales-rep and when clicking on the Verify Step button at the bottom of the page I get an error
Step not yet complete... here's what's wrong:
We can't find criteria and immediate actions for Einstein Scores greater than or equal to 80.


This error message is not accurate as the steps in the process builder are there, however, I suspect the error is actually due to an email that I receive immediately after pressing the Verify Step button, I have copied and pasted the contents of the email below, any advice/help would be appreciated.

Subject: Developer script exception from Honeydew : 'LeadScoreGenerator' for job id '7071t000000V3oh' : Unauthorized endpoint, please check Setup->Security->Remote site settings. endpoint = https://eu16.salesforce.com/services/data/v43.0/composite/tree/ScoreIntelligence

ApexApplication <info@jp.salesforce.com>12:03 (9 minutes ago)
to me
Apex script unhandled exception by user/organization: 0051t000000MOhX/00D1t000000DWM6

Failed to invoke future method 'public static void createScoreAndFactors(List<Id>)' on class 'LeadScoreGenerator' for job id '7071t000000V3oh'

caused by: System.CalloutException: Unauthorized endpoint, please check Setup->Security->Remote site settings. endpoint = https://eu16.salesforce.com/services/data/v43.0/composite/tree/ScoreIntelligence

Class.LeadScoreGenerator.sendRequest: line 130, column 1
Class.LeadScoreGenerator.createScoreAndFactors: line 108, column 1
I am stuck on challenge 4. Although I have created the 'Load Seed Bank' dataflow (and I believe it is correctly formed) I get the following error:

"Couldn’t find the 'Load Seed Bank' dataflow. Confirm the dataflow matches the name as described in the challenge."

Here you can see a list of my dataflows:

List of data flows including one called 'Load Seed Bank'

Might you be able to help?

I have completed all of the required steps as required. Here is my Transaction Security Policy:

Transaction Security Policy

However when I go to check the challenge I get the following error:

Challenge error

Can someone please help?
 

Thanks