Question

Set current User contact in lookup on onEntityInitialized

Hi Team,

 

I want to set the value of current user logged in to the system in a lookup of contact of a section and as soon as the New button for new record is clicked, the lookup should be already auto-filled with the current user contact name.

 

 I tried using this.set("UsrUserName",CURRENT_USER_CONTACT); but it is not working.Please help me achieve this.

 

Thanks,

 Sarika

Like 0

Like

2 comments
Best reply

Hi Sarika,

 

UsrCurrentContact below is a lookup column referencing the Contacts object:

onEntityInitialized: function() {
				this.callParent(arguments);
				this.set("UsrCurrentContact", Terrasoft.SysValue.CURRENT_USER_CONTACT);
			},

As a result the value is set for the column once the page is opened.

 

Best regards,

Oscar

Hi Sarika,

 

UsrCurrentContact below is a lookup column referencing the Contacts object:

onEntityInitialized: function() {
				this.callParent(arguments);
				this.set("UsrCurrentContact", Terrasoft.SysValue.CURRENT_USER_CONTACT);
			},

As a result the value is set for the column once the page is opened.

 

Best regards,

Oscar

Hi Oscar,

 

Thanks for the response. It works fine

Show all comments