Pass relationship field in process variable

Hi all hope someone can help.

I am working on an integration in a process model

and I want to pass some variables to the integration step

I am assigning a recordtype value to the inputs in the data tab

all works for division for example where I assign pv!record.recordtypexxx.division

but it doesn't work when I assign the relationship data for example

departmentid has a value of =pv!record.recordtypexxx.relationshipxxx.fieldoftherelationship

It seems that the relationship values are not being passed?

If I create an interface to display the data everything is there as expected both in the main record type and the looked up data from the related record type is there and correct.

So the relationship works.

Then why when I call the relationship data in the inputs in the integration it doesn't pick it up??????

  Discussion posts and replies are publicly visible

Parents Reply
  • thank you for the Hint Hrishikesh!

    Posting here the final code I had to use to reference a relationship field to a record type in the value field of the Data inputs tab

    = index(
      a!queryRecordType(
        recordType: NJW NewJoiner,
        fields: {
          NJW NewJoiner.relationships.njwPicklistGhDepartment.fields.id'
         },
        pagingInfo: a!pagingInfo(startIndex: 1, batchSize: 1),
        filters: a!queryFilter(
          field: recordType!NJW NewJoiner.fields.id,
          operator: "=",
          value: pv!record['recordType!NJW NewJoiner.fields.id]
        )
      ).data['recordType!NJW NewJoiner.relationships.njwPicklistGhDepartment.fields.id'],
      1,
      cast(
        'recordType!NJW NewJoiner',
        null
      )
    )

Children
No Data