- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-13-2024 11:38 PM
Hi Community,
I have a requirement, wanted to populate the parent number in related record.
Parent table (pm_project) and child table (pm_project_phase) once i create a parent record then in related list there is section called project phase and when i click on new and create new record then record number of pm_project needs to populate in pm_project_phase record.
Here when i click new button it will show only description and short desc fields only in form after i submit this form it will show something like the down image (all field of project phase will be visible)
So I created a Before insert BR in pm_project_phase table (child) and in script i used current.parent =current.parent.number; but it didn't work tried like parent is the backend name of the field where i need to set value
so i also used this like in image in parent record field it is showing the empty value ....
In child table there is field called parent record (backend name parent) in this field i need to populate the number of the parent
Please help me with the script how we can achieve this
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-14-2024 12:10 AM
Hello @suuriya
try using this:
current.parent = current.u_parent_project + ''
current.update()
because as I can see only your Custom parent project field is populated.Hope that this helps you!
If the provided information answers your question, please consider marking it as Helpful and Accepting the Solution so other community users can find it faster.
All the Best,
Stefan
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-14-2024 12:24 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-14-2024 01:13 AM
What are you using to populate the project type, can you add an screenshot of the script and the options for the type.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-14-2024 01:15 AM - edited 02-14-2024 01:17 AM
HI @Stefan Georgiev ,
I have written 2 different BR's to achieve this....now it is working as expected
Thanks
