Forum Discussion

NAl's avatar
NAl
Contributor
4 years ago

Failure: Related External ID: Cannot lookup a property on a null value, Reason: Value referenced in the sub-expression

Hi all,

I am trying to conduct an upsert operation on a child record in Salesforce.
I have defined the External ID for the record and the related object but keep receiving this message:

Failure: Related External ID: Cannot lookup a property on a null value, Reason: Value referenced in the sub-expression

The null-safe access has been checked in each of the mapper snaps.

10 Replies

  • Supratim's avatar
    Supratim
    Contributor III

    @NAl Looks like even through you have defined external id, it is evaluating as null value from snap. Is that hardcoded value ? If not just double check your expression (=) is enable for external id field or not.

  • NAl's avatar
    NAl
    Contributor

    Hi there, the External Id isn’t hardcoded. In the output preview, there is a valid value

    • jlandells's avatar
      jlandells
      Former Employee

      It’s definitely that field that it’s complaining about, rather than the External-ID Field? (I’m not seeing any errors highlighted in that screenshot)

    • Supratim's avatar
      Supratim
      Contributor III

      @NAl Can you hardcoded the value and test, then we can understand the issue in salesforce or snap side.

    • del's avatar
      del
      Contributor III

      @NAl,

      I believe the Salesforce Upsert snap’s “External-ID Field” and “Related External ID” fields are expecting the actual field names - not the values from the fields. The values should be in your input payload - with matching key names.

      Try unchecking the expression toggle “=” and removing the “$”. Or otherwise, uncheck the toggle and use the suggest feature.

  • NAl's avatar
    NAl
    Contributor

    Hi all,

    I ended up creating a new version of the pipeline and that worked.

  • rohitdhiman's avatar
    rohitdhiman
    New Contributor

    I also faced a similar issue, the issue is with the value “$” in External-ID field, in real it is expecting the name of the object against you want to do upsert , so no the value ,