# "TypeError: Cannot create property 'records' on string

**URL:** <https://discourse.nodered.org/t/typeerror-cannot-create-property-records-on-string/73995>\
**Category:** General\
**Created:** [20 January 2023 23:32 UTC](https://discourse.nodered.org/t/typeerror-cannot-create-property-records-on-string/73995 "2023-01-20T23:32:08Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![subbu.kobra](https://avatars.discourse-cdn.com/v4/letter/s/a9adbd/32.png) [@subbu.kobra](https://discourse.nodered.org/u/subbu.kobra)\
**Post date:** [20 January 2023 23:32 UTC](https://discourse.nodered.org/t/typeerror-cannot-create-property-records-on-string/73995/1 "2023-01-20T23:32:08Z")

</div>

Hi,

I am brand new to node-red. I am trying to get contacts from Salesforce using SOQL node. After following few sites, I finally able to create a successful connection with salesforce. However, at the end I am getting following error.

> "TypeError: Cannot create property 'records' on string '{"totalSize":2,"done":true,"records":[{"attributes":{"type":"Contact","url":"/services/data/v45.0/sobjects/Contact/0036g00001gn4N7AAI"},"Id":"0035t00101gn4N7AAI","Name":"kom"},{"attributes":{"type":"Contact","url":"/services/data/v45.0/sobjects/Contact/0036g00001hN6uaAAC"},"Id":"0035t00101hN6ueAAC","Name":"abc bbc"}]}'"

Can anyone help what's the reason for this error. I am attaching screen shot of my flow?

 ![node-red-error](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/9/0/9033ab6f99e2689e98d67cb2ae46fea18145301a.jpeg)

---

<div class="post-metadata">

**Author:** ![subbu.kobra](https://avatars.discourse-cdn.com/v4/letter/s/a9adbd/32.png) [@subbu.kobra](https://discourse.nodered.org/u/subbu.kobra)\
**Post date:** [26 January 2023 21:55 UTC](https://discourse.nodered.org/t/typeerror-cannot-create-property-records-on-string/73995/2 "2023-01-26T21:55:33Z")

</div>

Hi, Can one of the experts look into it pls?

Thanks,  
Bala

---

<div class="post-metadata">

**Author:** ![ralphwetzel](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/ralphwetzel/32/53713_2.png) [@ralphwetzel](https://discourse.nodered.org/u/ralphwetzel)\
**Post date:** [26 January 2023 22:08 UTC](https://discourse.nodered.org/t/typeerror-cannot-create-property-records-on-string/73995/3 "2023-01-26T22:08:23Z")

</div>

Without any experience dealing with

> [@subbu.kobra](#):
>
> Salesforce using SOQL node

I'm quite sure, your

> [@subbu.kobra](#):
>
> TypeError: Cannot create property 'records' on string '{"totalSize":2,"done":true,"records"

is triggered by the fact that what you think is a JSON `<object>` in essence is a `<string>`.  
What are you injecting into the flow?

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/1X/d073cd938eafa2e558d7c2cd59003b3ef4963033.png) [@system](https://discourse.nodered.org/u/system)\
**Post date:** [27 March 2023 22:09 UTC](https://discourse.nodered.org/t/typeerror-cannot-create-property-records-on-string/73995/4 "2023-03-27T22:09:20Z")

</div>

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.
