It's a pretty simple workflow but somehow I am stuck. I need to create a task after our accounting department saves an invoice so that our sales engineer team knows to call the customer and follow up. I know it should be pretty straight forward but somehow I have messed it up. Below is my logic:
Customer Record: Custom field called "Sales Engineer" that is an employee based list but is not required and often empty.
Workflow: When an invoice is submitted, I want a task to be assigned to the sales engineer so that they will know to follow up with the customer. The logic is simple and was able to join the invoice to the customer record in workflow and it worked great when the Sales Engineer is present. The kicker is I want NS to assign the record to an SE by default if the field is blank. I tried a formula for this logic and keep on getting that I am using an "Invalid Expression". My logic for the formula is
Field: Assigned
Formula: CASE WHEN {custbody3.custentity8} IS NULL THEN 5058 WHEN LENGTH( {custbody3.custentity8} ) = 0 THEN 5058 ELSE {custbody3.custentity8} END
I tried substituting 5058 (the employee ID that I want it to default to) with the employee name and still was not working. Also, I tried using the nlapiLookupField but got way over my head with that one.
Any ideas?