• Raju Korotana
  • NEWBIE
  • 0 Points
  • Member since 2020

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 1
    Questions
  • 1
    Replies
I am trying to default a lookup field on my child record using app exchange enhanced data grid application but it is not working.  I can default the record type and parent ID but not the lookup.  

Steps: I add the lookup to my list fields

FX5__Job__r.Treatment_Wellbore__c <<- this is in my list view

and my code for new record is

{
"entityApiName":"FX5__Ticket__c",
"navigationLocation": "LOOKUP",
"defaultFieldValues": {"FX5__Job__c" : "#parentrecordid#",
 "RecordTypeId" : "012f4000000JmLYAA0",
"Treatment_Design__c" : "#FX5__Job__r.Treatment_Wellbore__c#"}
}

when i use the new User-added imagebutton i get error

Looks like there's a problem.
Unfortunately, there was a problem. Please try again. If the problem continues, get in touch with your administrator with the error ID shown here and any other related details.
Error ID: 503534760-55543 (-1065292068)

 
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?