You need to sign in to do that
Don't have an account?
abivenkat
DML operation UPDATE not allowed on Email Message - issue in Trigger
hi all,
In my scenario, i have to query the subject field from Email Message object and make some changes and update those changes back to get effect. while doing this, i am getting the error as
DML operation UPDATE not allowed in Email Message
how can i update the Subject field in the Email Message object?
thanks
abivenkat
SFDC Learner
The EmailMessage object is not updateable. Your only option is to delete it and add a new one if you need to edit it.
All Answers
hi,
If one goes by the error it seems you dont have the rights to do that. It seems you are trying to edit the subject of an existing email object which is perhaps not allowed in salesforce.
hi ispita,
your point of view seems to be having rights to perform, then, who will be permitted to do these in salesforce. i am using sandbox environment, so that, i dont have rights to alter the Email Message object or what?
is there any thing we can do to achieve this functionality?
thanks,
abivenkat,
SFDC Learner
The EmailMessage object is not updateable. Your only option is to delete it and add a new one if you need to edit it.
The werewolf is correct .....
As you cannot edit the subject of an email already sent or received ~ that is the business sense behind this ....
i have fixed with another workaround in my issue. i was writing the trigger in my cases object and was trying to update the existing email message which is stored in the emailmessage object. but, instead of doing like that, i wrote the before insert trigger in email message object and fixed the issue. thanks for your replies and guiding me thro the correct way. thank u ispita and werewolf..
thanks,
abivenkat
SFDC Learner