You need to sign in to do that
Don't have an account?
Force developer 4
Make field blank through trigger?
Hi ,
I have a two objects 1.Candidate__c 2.Book__c.
Book is the child object for Candidate. we can create a book records through candidate related list.
Book is having picklist field i.e "Book_Name__c". Book_name__c having only one value Java but while creating a book record by default None will be displayed for this field.
Now i have created a Book record with Book_Name__c= Java through candidate related list.
My question is :
If i create another book record with Book_Name__c= Java through candidate related list then i need to make previously created record field Book_Name__c is blank(null)
i need to achieve the above requirement through trigger only. Can you please help me on this?
I don't know coding pls help me!!
Thanks in advance
I have a two objects 1.Candidate__c 2.Book__c.
Book is the child object for Candidate. we can create a book records through candidate related list.
Book is having picklist field i.e "Book_Name__c". Book_name__c having only one value Java but while creating a book record by default None will be displayed for this field.
Now i have created a Book record with Book_Name__c= Java through candidate related list.
My question is :
If i create another book record with Book_Name__c= Java through candidate related list then i need to make previously created record field Book_Name__c is blank(null)
i need to achieve the above requirement through trigger only. Can you please help me on this?
I don't know coding pls help me!!
Thanks in advance
Consider the if condition in a trigger like Book__c.
//user before insert or before update events on
if(Book_Name__c='java'){
// here you take the triggee.old values in to a for loop
for(book__c bb : trigger.old){
//here you can modify the old values has per your condition
}
}
I hope it helps,
Thank You.