Auto populate "Number" field from parent table to "Parent Request Number" field in Child.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-26-2019 06:19 PM
G'day all,
I've posted this question before but couldn't get the working solution for it. To begin with, I've a form (RJ Request) which have a field "Number" as shown in the screenshot below:
Now, I want to auto populate "Number" field value onto "Parent Request Number" field of child form RJ Sub Task. Please find the screenshot below:
To serve this purpose I've created a Parent-Child Relationship b/w RJ Request and RJ Sub Task table. By creating a reference field in RJ Sub Task Table as "Parent Request Number".
But as soon as I'm creating a Sub Task I cannot see "Number" populating onto "Parent Reference Number".
Can anyone please share any solution for this.
Cheers,
RJ

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-26-2019 07:21 PM
Did you tried creating before business rule? If so share screenshot
try something like
current.u_parent_request_number = current.parent.sys_id;

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-26-2019 07:40 PM
Hi Mike,
Thanks for your response. Yes, I have created a BR on RJ Sub Task Table.
On top of that I've created a onLoad() Client Script on the same table. Please find the screenshot below:
Since, I've used Interceptor page in b/w RJ Request and RJ Sub Task so I thought of using this technique of scripting.
To make it clear I'm attaching screenshot below:
1. "New Task" button is on RJ Request form.
2. When I'm going to click on New Task Button, it will redirect me to the Interceptor page.
3. Selecting RJ Sub Task from Interceptor page should take me to the RJ Sub Task form and Parent Request Number should auto populate(same as number on RJ Request form).
Cheers,
RJ

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-26-2019 07:46 PM
uncheck active on client script and replace business rule with below
current.u_parent_request_number = current.parent.sys_id;

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-26-2019 07:55 PM