You need to sign in to do that
Don't have an account?
Btuitasi1
Locking Idea after time span
Hey guys,
I have created a workflow that changes a field in Ideas from "Open" to "Locked" after 30 days. Now, I would like to create a trigger that would actually lock the record making it read-only. How would I call the record type in my trigger? Here is my code so far:
Trigger IdeaRecordLock on Idea (after update, after insert) {
for (Idea a : Trigger.New) {
if (a.Voting_Status__c == 'Locked') {
// the remaining code would go in and change the record to read-only. Admins and standard users would be the only ones able to edit.
Any ideas?
Thanks guys!
I have created a workflow that changes a field in Ideas from "Open" to "Locked" after 30 days. Now, I would like to create a trigger that would actually lock the record making it read-only. How would I call the record type in my trigger? Here is my code so far:
Trigger IdeaRecordLock on Idea (after update, after insert) {
for (Idea a : Trigger.New) {
if (a.Voting_Status__c == 'Locked') {
// the remaining code would go in and change the record to read-only. Admins and standard users would be the only ones able to edit.
Any ideas?
Thanks guys!
https://success.salesforce.com/ideaView?id=08730000000BpTQ