• Jaya Prakash Merepala
  • NEWBIE
  • 0 Points
  • Member since 2019


  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 2
    Questions
  • 1
    Replies

How can I count the number of objects I received in JSON response?
In the below response I got two objects (id:1234, id:2345) and I want a variable that shows the total number of objects received in response is 2.
I tried using Object.keys(jsonBody).length but this is not working in Salesforce.
I also tried
JSONParser = JSON.createdParser(jsonBody) but this is not giving me the count of objects.

[
    {
        "id" : 1234,
        "organization_id" : 9123,
        "location_id" : 123,
        "name" : "Organizatoin Name",
        "services" : [
            {
                "id" : 1234,
                "service_id" : 987

            },
            {
                "id" : 1234,
                "service_id" : 678
            }
        ]
    },
    {
        "id" : 2345,
        "organization_id" : 8123,
        "location_id" : 123,
        "name" : "Company Name",
        "services" : [
            {
                "id" : 2626,
                "service_id" : 987

            },
            {
                "id" : 2727,
                "service_id" : 678
            }
        ]
    }
]
Any kind of help of appreciated. Thanks.!

Hi,

I am trying to copy field values from one object to other. I have a field "Cure Types" which is a multiselect picklist with values "A","B","C","D" and "E". I have this field on both "Opportunity" object and also on a custom object called "Cure". I build a process builder to copy the value from Opp to Cure whenever a new record is created in Cure.

I was unable to find the field in PB (even though they have Master-detail relationship) so I started using formula.

Crieria
NOT(ISBLANK([Cure__c].Opportunity__r.Cure_Types__C))
Action
what should be the action to copy the field value from Opp to Cure?

 

Hi,

Our user is trying to create a new list view on a custom object. The user cannot see a field in the available options when filtering.
Where do I need to check for the permissions?

The user has read/edit permissions on that particular field.
  • January 27, 2014
  • Like
  • 0