You need to sign in to do that
Don't have an account?
TheresaAnderson
Initial term of field expression must be a concrete SObject List
Can you help me with the following error msg?
Initial term of field expression must be a concrete SObject List
trigger ChatterPostSURLStatus on Contract (after update) {
for(Contract c: Trigger.new){
CollaborationGroup[] oG = [Select ID, Name from CollaborationGroup];
if(c.Status == 'Granted' && c.ActivatedDate==Today() && oG.Name == 'Renewal'){
FeedPost sPost = new FeedPost();
sPost.ParentId = oG.ID;
sPost.Body = c.Account && 'is now supported on SURL';
insert sPost;
}
}
}
Hi TheresaAnderson,
CollaborationGroup[] oG = [Select ID, Name from CollaborationGroup];
if(c.Status == 'Granted' && c.ActivatedDate==Today() && oG.Name == 'Renewal')
oG is an Array of SObjetcs and you are trying to get field of abject that is not possible directly to need to specify which element of the Array yoou wantto get fields like this:-
CollaborationGroup[] oG = [Select ID, Name from CollaborationGroup];
CollaborationGroup g = oG[0];
if(c.Status == 'Granted' && c.ActivatedDate==Today() && G.Name == 'Renewal')
This will work..
All Answers
Hi TheresaAnderson,
CollaborationGroup[] oG = [Select ID, Name from CollaborationGroup];
if(c.Status == 'Granted' && c.ActivatedDate==Today() && oG.Name == 'Renewal')
oG is an Array of SObjetcs and you are trying to get field of abject that is not possible directly to need to specify which element of the Array yoou wantto get fields like this:-
CollaborationGroup[] oG = [Select ID, Name from CollaborationGroup];
CollaborationGroup g = oG[0];
if(c.Status == 'Granted' && c.ActivatedDate==Today() && G.Name == 'Renewal')
This will work..
Thank you.
Thank you this helped me too