function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
anil Anil5anil Anil5 

How to write Genaric Trigger on Parent Object to show error if child Objects fields having null.

How to write Genaric Trigger on Parent Object to show error if child Objects fields having null.
Parent Object is Opp
Child Objects are opp.lineitems [Field1__c,Field__2] and GD_Val__c[FieldJ__c,FieldZ__c]
If child Objects field are blank and child objects having attachments then have to show error msg[Update Fields & Remove Attmt] while updating User__c Field on Parent[Opp]
Khan AnasKhan Anas (Salesforce Developers) 
Hi Anil,

Greetings to you!

Please refer to the below link from the developer forums which has sample code which might help you with the above requirement. Kindly try to implement according to your requirement.

https://developer.salesforce.com/forums/?id=9060G0000005R5sQAE

I hope it helps you.

Kindly let me know if it helps you and close your query by marking it as solved so that it can help others in the future. It will help to keep this community clean.

Thanks and Regards,
Khan Anas
anil Anil5anil Anil5
Have to check attmts also, the above link not work for me.