01-20-2017 03:58 AM - edited 01-20-2017 03:59 AM
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?
01-20-2017 08:40 AM
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();
01-23-2017 03:25 AM
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 alduet only posted the source code for this contact version, and only a .dll for the company version.
I have PMed alduet asking if he could share teh source code for the company variant, but seen as its been 1 year since his last login, and 7 years since he originally posted the code, I feel its a bit of a long shot.
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...