How to Set a value of field

ursnani
Giga Guru

I have a field on Form and i want to set the value of that field

so the field should be filled with the Company field value of the User record. I have tried the following code but there is no luck. can someone please hlep its very urgent

g_form.setValue('user',g_user.userID);

var user = g_form.getReference('name','department;department.name');

g_form.setValue('company',user.department.name);

Thanks

5 REPLIES 5

Prateek kumar
Mega Sage

Hello


Can you mark my answer as correct, helpful and hit like if you were able to achieve the requirement. This helps in removing this question from unanswered list and helps users to learn from your thread. Thanks in advance.



Please mark my response as correct and helpful if it helped solved your question.
-Thanks