The below Apex code is used to update a field(Comments__c) in Member__c Object,
where Marital__Status and Comments__c are fields n Member__c object.
Code:
trigger commentsUpdate on Member__c (before Insert,before update)
{
for(Member__c member : Trigger.new)
{
if(member.Marital_Status__c != '')
{
member.Comments__c = member.Marital_Status__c;
}
else
{
member.Comments__c = 'No comments';
}
}
}
Plese see my blog and Check what is the problem in my blog adscence rejectd
ReplyDeleteMy Blog:freeatozinformation.blogspot.com