Autopopulate Contact field when the Account is selected.

Community Alums
Not applicable

My code wont work or i missing something? please need help. 

Contact is reference field

 

function onChange(control, oldValue, newValue, isLoading, isTemplate) {
   if (isLoading || newValue === '') {
      return;
   }
var selectedAccount = g_form.getValue('account');

if (selectedAccount == 'Microsoft' ){

	g_form.setValue('contact', 'Microsoft Service Desk');

}

   //Type appropriate comment here, and begin script below
   
}

 

11 REPLIES 11

Community Alums
Not applicable

Please share screenshot of your script and form.

Community Alums
Not applicable

Hello @Community Alums 

I already configured the problem thanks for support.