What can a Dynamic Creation Script access?

phsdm
Giga Expert

I have enabled the dynamic creation script in the Asset form's reference to Cost Center.   I want to create a Cost Center when an unknown value is entered.   But I have a twist:   I want to copy a type field's value from the Asset form to the new Cost Center record.

 

My dynamic creation script works fine when it is like this:

 

current.u_type = "wbs";

current.name = value;

current.insert();

 

But I want to get the type from the form.   It doesn't work for me like this:

 

current.u_type = g_form.getValue("u_charge_type");

current.name = value;

current.insert();

 

A related question.   How do I log from this script?   I tried jslog() and gs.log() but can't find the output.

6 REPLIES 6

Community Alums
Not applicable

I was wrong

Awesome, "parent" is in scope for the dynamic creation script, cool. 🙂