dot walk to related list

polodre2
Tera Contributor

Hello, I have a table that has related lists. Is there a way to dot walk to the related list?

I have attached a screenshot of the related lists

3 REPLIES 3

Sainath N
Mega Sage
Mega Sage

@polodre2 : You want to dot-walk from the parent table that has the related lists?

 

 

@Sainath N  yes, that is correct. dot-walk from parent table to related list

@polodre2 : The significance of related lists on the parent table is to hold multiple entries for a single parent record. (Ex: An incident can have multiple incident tasks.)

 

You cannot directly dot walk, but if you want to access the values from related list entries, you can query the child table by passing the reference key of the parent table and do the processing that you require.

 

Below is the sample code, just to give you an idea. Note: One parent entry can have multiple related list entries.

var gr = new GlideRecord("YOUR_CHILD_RELATED_TABLE");
gr.addQuery("parent", "your_parent_sys_id");
gr.query();
while (gr.next()) {
    // Add the logic that you need 
}

 

Please mark this as correct answer and helpful if it resolved, or mark this helpful if this help you to reach towards solution.