• KiranNaidu
  • NEWBIE
  • 30 Points
  • Member since 2019

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 4
    Questions
  • 3
    Replies

                <!-- test code    Start---->
                <apex:column headerValue="Allotnumber">
                   <!-- <apex:inputCheckbox onclick="{!showPopup}" rendered="{!accWrap.ListPrice == 44.95}" /> -->
                    <apex:commandButton value="SelectNumber" action="{!showPopup}" rendered="{!accWrap.ListPrice == 44.95}" />
                </apex:column>

I just need help completing this use case
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. 
If I run the same query in the developer console, it is giving the result with username. for Gust profile also I shared this Class.

Can somebody help me what is that i am missing.

Need urgent help.
Hi All,
I am learning the salesforce and wanted to understand the below which in the Trigger concept.

I get the below result
Code: [SELECT Id,Name,(SELECT Id,Name FROM Opportunities) FROM Account WHERE Id IN :Trigger.New]);
output: {0012w00000CWweoAAD=Account:{Id=0012w00000CWweoAAD, Name=Grapes & Melons}}

and then I tried accessing the Opportunities by useing the below code line
Code:
System.debug('acctsWithOpps.get(a.Id).Opportunities.size()=' + acctsWithOpps.get(a.Id).Opportunities);

output:
acctsWithOpps.get(a.Id).Opportunities.size()=(Opportunity:{AccountId=0012w00000CWweoAAD, Id=0062w000004b2mCAAQ, Name=Grapes & Melons Opportunity}, Opportunity:{AccountId=0012w00000CWweoAAD, Id=0062w000004b2mMAAQ, Name=Grapes & Melons Opty}, Opportunity:{AccountId=0012w00000CWweoAAD, Id=0062w000004b44SAAQ, Name=Grapes & Melons Opportunity})

How do i need to write the code to access each opportunity field details if i wanted to access. Let say I wanted to check a particular type of opportunity is existed or not and then do an operation.

Thank you!

                <!-- test code    Start---->
                <apex:column headerValue="Allotnumber">
                   <!-- <apex:inputCheckbox onclick="{!showPopup}" rendered="{!accWrap.ListPrice == 44.95}" /> -->
                    <apex:commandButton value="SelectNumber" action="{!showPopup}" rendered="{!accWrap.ListPrice == 44.95}" />
                </apex:column>

I just need help completing this use case
If I run the same query in the developer console, it is giving the result with username. for Gust profile also I shared this Class.

Can somebody help me what is that i am missing.

Need urgent help.
Hi All,
I am learning the salesforce and wanted to understand the below which in the Trigger concept.

I get the below result
Code: [SELECT Id,Name,(SELECT Id,Name FROM Opportunities) FROM Account WHERE Id IN :Trigger.New]);
output: {0012w00000CWweoAAD=Account:{Id=0012w00000CWweoAAD, Name=Grapes & Melons}}

and then I tried accessing the Opportunities by useing the below code line
Code:
System.debug('acctsWithOpps.get(a.Id).Opportunities.size()=' + acctsWithOpps.get(a.Id).Opportunities);

output:
acctsWithOpps.get(a.Id).Opportunities.size()=(Opportunity:{AccountId=0012w00000CWweoAAD, Id=0062w000004b2mCAAQ, Name=Grapes & Melons Opportunity}, Opportunity:{AccountId=0012w00000CWweoAAD, Id=0062w000004b2mMAAQ, Name=Grapes & Melons Opty}, Opportunity:{AccountId=0012w00000CWweoAAD, Id=0062w000004b44SAAQ, Name=Grapes & Melons Opportunity})

How do i need to write the code to access each opportunity field details if i wanted to access. Let say I wanted to check a particular type of opportunity is existed or not and then do an operation.

Thank you!