+ Start a Discussion
cairlinncairlinn 

Update Case subject automatically with 2 other fields

I would like to be able to update the CASE subject field with the contents of 2 other custom fields everytime the record is updated/added.
Do i just use the workflow with field update?
Can it be done with s-control snippet? if so, how?

Thanks in advance for any help or direction
RajaramRajaram
Yep.  You can use a workflow rule and a field update on the subject field to achieve what you want.
orikkerorikker
I tried to use field update workflow for Subject in task it shows:

Error:
Formula result is data type (Text), incompatible with expected data type (Picklist).

How can I fix that?

Thanks,
MikeGoelzerMikeGoelzer
There's a function called ISPICKVAL() that would let you figure out the text string equivalent of a picklist value which you could then concatenate to some regular text.

IF( ISPICKVAL(Origin  , "Web" ) , "Web","Not the Web" ) & " / "

Might try something like this though using a trigger:

trigger t on Case(before insert,before update) {
for(Case c:trigger.new) {
    c.Subject += ' ' + c.Origin + '/' + c.Priority;
}
}