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
KhaledZeroKhaledZero 

Query to get groups whith LastFeedModifiedDate > 30 day

Hello,

 

i want get a liste of users and list  groups of each user whith LastFeedModifiedDate > 30 day

 

SELECT gp.LastFeedModifiedDate, gp.Name, gp.OwnerId, user.Id, user.Username 
FROM CollaborationGroup gp, User user
WhERE gp.LastFeedModifiedDate > 30 AND gp.OwnerId = user.Id 

can you help me beacause my query it not work  

thx

Best Answer chosen by Admin (Salesforce Developers) 
KhaledZeroKhaledZero
SELECT Owner.Username, LastFeedModifiedDate, Name, OwnerId FROM CollaborationGroup WHERE LastModifiedDate < LAST_N_DAYS:90

 

All Answers

Sonam_SFDCSonam_SFDC

Hi Khaled,

 

I see that you are using paramenter LastFeedModifiedDate in the where clause, could you try giving the modified date time in the format as shown below and see if it helps:

 

e.g. WHERE LastFeedModifiedDate > 2012-01-01T00:00:00Z

KhaledZeroKhaledZero

Hi Sonam_SFDC,

Thnx for ansewr

how i can test the resulte of my querys in salesforce?  there is a plateform like phpMyAdmin for MySql?

 

Thx

 

 

Sonam_SFDCSonam_SFDC

Hey Khaled,

 

You can use workbench or Force.com IDE to run SOQL queries and fetch data from Salesforce.

 

https://workbench.developerforce.com/login.php

http://wiki.developerforce.com/page/Force.com_IDE

 

Read more about them on:

Force.com IDE: http://wiki.developerforce.com/page/Force.com_IDE

Workbench: http://wiki.developerforce.com/page/Workbench

 

KhaledZeroKhaledZero

Hey Sonam_SFDC and thx for your help

 

i think that i have problem whith Join the two table "User  & CollaborationGroup"


how we can do a join whith SOQL ?

 

thx

KhaledZeroKhaledZero
SELECT Owner.Username, LastFeedModifiedDate, Name, OwnerId FROM CollaborationGroup WHERE LastModifiedDate < LAST_N_DAYS:90

 

This was selected as the best answer