Skip to main content
March 1, 2022
Question

Error passing record type in Process Model

  • March 1, 2022
  • 8 replies
  • 0 views

Hi,

I called a summary view interface in another interface using record relationship but having problem in the process model. 

This is my Phase Title Interface calling another interface 'Summay View' using the rule input "titleinput" which is a record type. The interface works fine but when I try to create a process model, I am not able to call the parameters. 

The expression used: 

a!formLayout(
label: "Selected Project",
contents: {
a!sectionLayout(
contents: {
rule!MD_PM_ProjectSummaryView(ri!titleinput['recordType!}MD_PM_PhaseTitle.relationships.}mdPmProjectdetail']) - I used the record relationship here. 
}

Process model:

Is it because titleinput is a record?

how to resolve this issue? or how can I use summary view interface in Phase title interface without using the title input record type?

Please advice. 

TIA.

    8 replies

    mikes0011
    Brainy
    March 1, 2022

    You'll have a much easier time if you can use the CDT type on your form instead.  AFAIK process variables can't be Record Type (and it seems a bit silly that we can't just cross-typecast them even now).  When in doubt, i find it can simplify things quite a bit to just pass a Primary Key ID around and handle the work on-form and/or in-process.

    The Expression Guru
    March 1, 2022

    Hi Mike,

    Thanks for the prompt response. I am just trying to figure out the methods to use record relationships in interfaces. 

    I tried changing the rule input to CDT but I am getting the below error:

    "Could not display interface. Please check definition and inputs. Interface Definition: Expression evaluation error in rule 'md_pm_projectsummaryview' at function a!integerField [line 6]: Invalid index type: Record relationship uuid: c4ecb714-5dcf-44a1-a824-db3ef50a5285 Record type uuid: facc26ec-c1c0-4a54-80e5-cf61552088b0 Relationship path: null"

    I want to use only one rule input to access the other record. How can I do that? 

    Should I pass two rule inputs to make it work? 

    Will a!queryRecordType() help to resolve this issue? If so, where and how can I use it here? 

    Thanks

    gopalk2865
    Participating Frequently
    March 2, 2022

    Hi , summary view interface is basically used for record view in record type. I would suggest you to query your data in a local variable and then pass it to your fields. You can use queryentity or queryRecordType and yes you can use related data using a!relatedData in queryRecordType.