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

Rahul J
Mega Expert

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:find_real_file.png

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:

find_real_file.png

 

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". 

find_real_file.png

find_real_file.png

find_real_file.png

 

But as soon as I'm creating a Sub Task I cannot see "Number" populating onto "Parent Reference Number".

find_real_file.png

Can anyone please share any solution for this.

Cheers,

RJ

 

 

 

6 REPLIES 6

Mike Patel
Tera Sage

Did you tried creating before business rule? If so share screenshot

try something like

current.u_parent_request_number = current.parent.sys_id;

Hi Mike,

Thanks for your response. Yes, I have created a BR on RJ Sub Task Table.

find_real_file.png

On top of that I've created a onLoad() Client Script on the same table. Please find the screenshot below:

find_real_file.png

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.

find_real_file.png

 

2. When I'm going to click on New Task Button, it will redirect me to the Interceptor page.

find_real_file.png

 

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).

find_real_file.png

 

Cheers,

RJ

 

 

 

uncheck active on client script and replace business rule with below

current.u_parent_request_number = current.parent.sys_id;

still no luck. Unchecked Client Script and updated my BR as in the screenshot below:

find_real_file.png

 

find_real_file.png