You need to sign in to do that
Don't have an account?

Trigger Help: Update Parent checkbox if child field was changed
Hi Experts,
I'm still total newb in apex. I hope you could assist me on this.
Criteria:
Uncheck Textbox1__c (Lead - Parent) if Lookup__c (Document__r - child) was changed to blank.
I would appreciate any help coming from the experts.
Thank you.
I'm still total newb in apex. I hope you could assist me on this.
Criteria:
Uncheck Textbox1__c (Lead - Parent) if Lookup__c (Document__r - child) was changed to blank.
I would appreciate any help coming from the experts.
Thank you.
Here I have few questions ,please clarify so that we can help you .
What is your child object name ?
Do you mean when your look up field Document__r wil change to blank you need to make the Textbox1__c needs to blank .
Please confirm .
Thanks
Manoj
[1] http://blog.deadlypenguin.com/blog/2014/07/23/intro-to-apex-auto-converting-leads-in-a-trigger/
[2] http://www.sfdc99.com/2013/05/12/example-how-to-write-a-simple-apex-trigger-2/
Thank you in advance. Just to clarify:
Lead (parent)
Document__r (custom - child)
Textbox1__c (residing in Lead)
Lookup__c (residing in custom object)
Expected behavior:
When the lookup__c has been changed to blank, it will uncheck the box in the textbox__c
Thanks in advance Manoj.
Try with belwo code !!
Let me know if it helps !!
Thanks
Manoj
I've tried your code and I got Invalid initial expression type for field Lead.Id, expecting: Id at Line 5
Thank you.
Try with below code it will work I have missed some thing ..
Let me know if it helps !!
Thanks
Manoj