In the new related list tab the record created for one demand showing same record in all demands.

Mansi roy
Tera Contributor

Hello ALl,

 

I have created one new related list tab.I have added to demand related list.

For this i have created one new table and created the columns as required.

When i am creating any new record from this related tab it is showing in all records. But it should visible only for that record.

 

the Below one is  relationship.

 

Mansiroy_0-1727943022646.png

 

the record created for one demand is showing in all demand records.

 

Mansiroy_1-1727943140338.png

 

Can anyone please help me why this is happening.

 

Regards,

Mansi

 

 

1 ACCEPTED SOLUTION

Animesh Das2
Mega Sage

Hi @Mansi roy ,

 

Firstly, you must have a reference field on Efforts table referencing Demand table record. Then in the relationship record that you created, please put this below line of code in the 'Query with' field,

 

current.addQuery('sys_id', parent.<reference field name from 'u_efforts' table>);

 

replace this <reference field name from 'u_efforts' table> with actual field name from 'u_efforts' table in the line of code mentioned above.

 

Since there is no condition you put in the 'Query with' field, the relationship was messed up.

 

If this address your question, please mark this response correct by clicking on Accept as Solution and/or Kudos.

You may mark this helpful as well if it helps you.

Thanks, 

Animesh Das

View solution in original post

15 REPLIES 15

Animesh Das2
Mega Sage

Hi @Mansi roy ,

 

Firstly, you must have a reference field on Efforts table referencing Demand table record. Then in the relationship record that you created, please put this below line of code in the 'Query with' field,

 

current.addQuery('sys_id', parent.<reference field name from 'u_efforts' table>);

 

replace this <reference field name from 'u_efforts' table> with actual field name from 'u_efforts' table in the line of code mentioned above.

 

Since there is no condition you put in the 'Query with' field, the relationship was messed up.

 

If this address your question, please mark this response correct by clicking on Accept as Solution and/or Kudos.

You may mark this helpful as well if it helps you.

Thanks, 

Animesh Das

@animesh Thank you for the response.

 

I have created one new field with name 'Number' which is referrence field to demand table.

Mansiroy_0-1727945636737.png

 

But Still getting same records for all demands.

 

 

Hi @Mansi roy ,

 

Put the line as current.addQuery('sys_id', parent.u_number);

 

If this address your question, please mark this response correct by clicking on Accept as Solution and/or Kudos.

You may mark this helpful as well if it helps you.

Thanks, 

Animesh Das

Hi,

If i am putting sys_id  it is not showing any records.