How would you source a field that is the employee ...
# general
b
How would you source a field that is the employee list/record type from a field that is just a text area? I have a transaction form that has my name in a text area and I want to use my name in the text area to source a custom field that is actually my employee record so that I can actually include it in searches. Essentially I'm trying to fill out the created by field using the information in the text area. I'm stuck with this stupid text area due to the third-party integration. I've tried a case statement in a workflow but I realized too late that probably wouldn't work.
k
You can't really easily do this with workflow - and it'd be better to handle via script.
b
After spending more time than I care to admit on this last night, I figured that was the case. Would it just be a user event script so that every time the transaction record is saved it triggers it? And how would I look up the employee record in it? I'm guessing I need to plug the name into a search and return the result but maybe it's more simple than that.
k
nope - you definitely had right idea - plug user name into a search in order to get internal ID in order to set the internal ID into the right field.
b
Ok, that's exactly what I was trying to accomplish via workflow and it wasn't working. Onto the script it is. Thank you!
k
if it has to be in a workflow - a workflow action script should work.