You need to sign in to do that
Don't have an account?
Prentiss Jones 3
Hello, I'm new to Apex. But I think what I'm trying to do is simple. Would Like to creat a record (Goal Split) for each Goal Q Field (there are 4 of these fields) And carry user names to that record (Client Owner, Agency Owner, Addional Owner.) Goal Split.
On the the parent if a user changes (Client Owner, Agency Owner, Addional Owner) Then update the child (Goal Split) record.
Not all Goal Q fields have to be filled out. Example. Rep may have a goal for Goal Q1,Goal Q3,Goal Q4....skipping Goal Q2. In this case only create 3 records.
Trigger To Create Records
Hello, I'm new to Apex. But I think what I'm trying to do is simple. Would Like to creat a record (Goal Split) for each Goal Q Field (there are 4 of these fields) And carry user names to that record (Client Owner, Agency Owner, Addional Owner.) Goal Split.
On the the parent if a user changes (Client Owner, Agency Owner, Addional Owner) Then update the child (Goal Split) record.
Not all Goal Q fields have to be filled out. Example. Rep may have a goal for Goal Q1,Goal Q3,Goal Q4....skipping Goal Q2. In this case only create 3 records.
I have written the trigger code. Just replace the object and field API Names, if these are different from what I have used. Let me know if you need any other help.
Thanks,
Neetu
All Answers
I have written the trigger code. Just replace the object and field API Names, if these are different from what I have used. Let me know if you need any other help.
Thanks,
Neetu
Error: Compile Error: Didn't understand relationship 'Goal_Split__r' in FROM part of query call. If you are attempting to use a custom relationship, be sure to append the '__r' after the custom relationship name. Please reference your WSDL or the describe call for the appropriate names. at line 41 column 31
This would be the child relationship name on the Goal Split object:
Go to the Goal Split object and verify open the Master detail/look up field of Goal. In the below:
Master-Detail Options
Related To Goal Child Relationship Name Goal_Splits__r
You need to use this child relationship name in the query at line 41.
Thanks,
Neetu
It would not be reversed. when you open Goal Split object, there would be one field Goal of (Master Detail) type. In that field, you will find master detail options, verify the child relationship name there.
If you still not able to resolve this, you can provide me the login credentials either on skype neetu.bansal.5 or gmail neetu.bansal.5@gmail.com
Thanks,
Neetu
Now I'm getting this: Didn't understand relationship 'Goalnumber__r' in FROM part of query call. If you are attempting to use a custom relationship, be sure to append the '__r' after the custom relationship name. Please reference your WSDL or the describe call for the appropriate names.