• Jorge Romero 16
  • NEWBIE
  • 0 Points
  • Member since 2021

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 0
    Questions
  • 1
    Replies
In the workbench Rest Explorer for Salesforce Billing App.I used  Rest API with post method "/services/data/v49.0/composite/tree/blng__Invoice__c".
below is the JSON request body

{
"records" :[
    {
        "attributes" : {
            "type" : "blng__Invoice__c",
            "referenceId" : "ref1"
        },
    //InvoiceFields 
        "blng__Account__c": "0012y000006zj8uAAA",
        
    "InvoiceInvoiceLines" : {
        "records" : [
        {
                "attributes" : {
                    "type" : "blng__InvoiceLine__c",
                    "referenceId" : "ref2"
                    },
                "Name": "Test Product"
         },
         {         
                "attributes" : {
                    "type" : "blng__InvoiceLine__c",
                    "referenceId" : "ref3"
                    },
                    
                "Name": "Test Product"
         }]
      }
    }]
}

I get the below error "INVALID_FIELD
message: No such column 'InvoiceInvoiceLines' on sobject of type blng__Invoice__c
errorCode: INVALID_FIELD
"
Here "InvoiceInvoiceLines" is the Child relationship name.
Can someone help me in undestanding this issue.