Ember/Javascript is not my specialty and I’m struggling to do some basic stuff.
I just want to output the ID of the parent into my Smart View.
i.e. this is the URL: https://app.forestadmin.com/[project]/Staging/IT/data/acpCohorts/index/record/acpCohorts/111179/has-many/acpCohorts-acpEnrolments
I want to output 111179 into the template. How do I do this?
vince
June 22, 2023, 12:43pm
2
Hi @Owen_Kavanagh and welcome in our community !
You can access the parent record id like this:
In your JS:
this.args.parentRecord.id
In your template:
{{@parentRecord.id}}
Let me know if this is what you are looking for
2 Likes
Hi Vince,
This variable has suddenly stopped working for me unfortunately!
Do you have any idea what’s happening here and/or is there documentation for this for me to look through? I can’t find any reference to parentRecord anywhere.
Thanks in advance!
vince
March 26, 2025, 8:43am
4
Oh yes, I’ll fix it. Sorry about that
vince
March 27, 2025, 11:08am
5
The issue should be solved. Let me know if it’s okey on your side
1 Like
Yes, all is working perfectly now - thank you!
1 Like