Community
Showing results for 
Search instead for 
Do you mean 
Reply

Current Logged In User Field

New Member
Posts: 8
Country: United_Kingdom

Current Logged In User Field

[ Edited ]

So I want to change the colour of my background on the Companies records if that company has been assigned to the currently logged in user.

 

I am using Dynamic Label Control, and a tweak i took from here to do it (http://community.act.com/t5/Act-Developer-Downloads/Dynamic-Label-Control-Contact-view/td-p/72278/hi...)

 

my problem currently, is that i can set the colour controls to work based on a static value - but not based on the currently logged in user.

 

I'm hoping there is a little piece of code to pull the name of the currently logged in user, and I could alter code from the Dynamic Label Control tool to use that instead of the user defined static value.

 

So, anyone know how to grab the currently logged in users name?

Copper Super Contributor
Posts: 77
Country: Canada

Re: Current Logged In User Field

This should do it. Keep in mind this is not the username but rather the user's Contact name.

 

var currentUserFullName = _actApp.ActFramework.CurrentUser.Contact.ToString();
Ahsan Khalid

Chief Technology Officer
Keystroke Quality Computing Inc.
www.keystroke.ca

Highlighted
New Member
Posts: 8
Country: United_Kingdom

Re: Current Logged In User Field

Thanks so much for this, I can work with the users Contact Name instead of Username, probably safer to do it that way.

I would never have managed to figure that out on my own.. ^^

 

 

I was hoping to modify the source code to have the validation check use this info - but unfortunately 

http://community.act.com/t5/Act-Developer-Downloads/Dynamic-Label-Control-Contact-view/m-p/134448/hi...

 

I have PMed 

 

Any chance someone could help me edit the source code from contact to company?

 

The contact source code is here; http://community.act.com/t5/Act-Developer-Downloads/Dynamic-Label-Control-Source-Code-Only/td-p/7228...