You need to sign in to do that
Don't have an account?
![Amit Kr Singh Amit Kr Singh](https://dfc-org-production.my.site.com/img/userprofile/default_profile_45_v2.png)
How to write trigger on parent object when updating parent object then child object record value need to concatenate and display in parent object
Hi All,
In my current scenario
I am having two Object
1. projects__c(Parent object) (In Project object having field ProjectTaskDescription__c, TimesheetStartDate__c, TimesheetEndDate__c )
2. Timesheet__c(Child Object) (In Timesheet object having field TimesheetDescription__c, Timesheet_Date__c )
Now I want to write a trigger on the Parent object(Projects__c) when user will update TimesheetStartDate, TimesheetEndDate and once he will save then related timesheet object(Timesheet_Date__c) field date is between Project(TimesheetStartDate, TimesheetEndDate ) then (TimesheetDescription__c ) field value need to concatenate and display into project object field ( ProjectTaskDescription__c ) ..
Please help me how to write trigger for this.
Please help me to write a trigger on this scenario.
Thanks in Advance.
In my current scenario
I am having two Object
1. projects__c(Parent object) (In Project object having field ProjectTaskDescription__c, TimesheetStartDate__c, TimesheetEndDate__c )
2. Timesheet__c(Child Object) (In Timesheet object having field TimesheetDescription__c, Timesheet_Date__c )
Now I want to write a trigger on the Parent object(Projects__c) when user will update TimesheetStartDate, TimesheetEndDate and once he will save then related timesheet object(Timesheet_Date__c) field date is between Project(TimesheetStartDate, TimesheetEndDate ) then (TimesheetDescription__c ) field value need to concatenate and display into project object field ( ProjectTaskDescription__c ) ..
Please help me how to write trigger for this.
Please help me to write a trigger on this scenario.
Thanks in Advance.
Can you please give an example
"(TimesheetDescription__c ) field value need to concatenate and display into project object field ( ProjectTaskDescription__c ) ." please
explain this line
Thank you
Avaneesh Singh
but when User is entering (TimesheetStartDate__c, TimesheetEndDate__c) in project then if Timesheet_Date__c is between two date then only these TimesheetDescription__c need to dispaly in Project
Thanks,
here I write a trigger which satisfied your requirement if still any issue then let me know
before writing this trigger use a recursive apex class
This is your trigger check proper name of field and also a lookup name of timesheet that was in my trigger project
if this code is helpful please mark as best answer else let me know your problem
Thank you
Avaneesh Singh