Skip to main content
hema.mathivathanan
July 12, 2023
Solved

Interface and expression rule

  • July 12, 2023
  • 3 replies
  • 0 views

Hi, 

In the interface I use the rule input as my record A1. A field in this interface, I need to populate value from the other record B1.In other to use the relationship in the interface or expression rule, how to define the relationship. 

I tried giving the relationship in "relatedRecordData" in a!queryrecordtype. But, I am getting the below error:

Expression evaluation error at function a!queryRecordType [line 26]: Could not cast from Record Relationship to RelatedRecordData. Details: CastInvalidCould not cast from Record Relationship to RelatedRecordData. Details: CastInvalid

Can someone pls help here, 

    Best answer by bibhutim0004

    Hello,

    The relationship must be defined at the Record level before trying to query the record.

    Can you please confirm if you had already mapped the record B1 to your record A1 at the record level?

    If the above is already done, then try accessing the record B field with record recordtype!A.relationship.B1.field.

    3 replies

    bibhutim0004
    July 12, 2023

    Hello,

    The relationship must be defined at the Record level before trying to query the record.

    Can you please confirm if you had already mapped the record B1 to your record A1 at the record level?

    If the above is already done, then try accessing the record B field with record recordtype!A.relationship.B1.field.

    stefanhelzle0001
    Brainy
    July 12, 2023

    Can you share that code snippet?

    tushark6475
    July 13, 2023