Scripted Relationship Related List

Alon Grod
Tera Expert

Why my related list is not showing any records? 

 

Screen Shot 2023-01-19 at 16.48.53.png

 

Screen Shot 2023-01-19 at 16.49.41.png

 

12 REPLIES 12

ricker
Tera Guru

@Alon Grod,

I think you need to convert your pkg array to a string in the encoded query.

try this

current.addEncodedQuery(‘nameIN’ + pkg.toString());

 

@ricker still not working!!

@Alon Grod,

What do you get when you run it in a background script with a known parent.sys_id (wondering if that is right…maybe current.sys_id)?

What are you trying to get?  Are you sure your logic is correct?  It looks like you want a related list of software instances but isn’t there already one for software?

What happens when you comment out everything and put this as the query?

current.addQuery(‘software’, parent.sys_id);

 

Basheer
Mega Sage

Hi @Alon Grod 

As per me the code you've written is wrong here.

The current refers to queries from table while parent refers to applies to table

 

In line 4 you have written gliderecord on the parent table and querying it in comparision to u_master_software and sys_id - This would never result in even 1 record.

 

Please hit like button if my suggestion has helped you in any way.
Please mark correct if my response has solved your query.

Cheers,
Mohammed Basheer Ahmed.

what should be the correctiong? @Basheer