You need to sign in to do that
Don't have an account?
QCmduff
Trigger Compile Error
I am declaring a String variable = to an existing Case field of Text data type in a Trigger. Why am I getting this Compile Error?
"Illegal assignment from Schema.SObjectField to String"
Post your code. You are probably referring to the Field on the abstract Schema Object:
String s = Account.Name;
...rather than to the value of a field on an instance of the object:
Account a = [SELECT Name FROM Account WHERE Name = 'Foo' LIMIT 1]; String s = a.Name;
Yes, I have the same error I have this code
With the second option I got the error " Illegal assignment from Schema.SObjectField to String"...
Please help me.