需求: 有时候,我们需要把所有ListView的创建者,创建时间,名称和DeveloperName给取出来
取得单独一个Object的ListView信息
SELECT
Id,
Name,
DeveloperName,
NamespacePrefix,
SobjectType,
IsSoqlCompatible,
CreatedDate,
CreatedBy.Name,
LastModifiedDate, LastModifiedBy.Name, LastViewedDate, LastReferencedDate
FROM ListView
where
SobjectType ='Lead'
取得的结果如下
"_","Id","Name","DeveloperName","NamespacePrefix","SobjectType","IsSoqlCompatible","CreatedDate","CreatedBy","CreatedBy.Name","LastModifiedDate","LastModifiedBy","LastModifiedBy.Name","LastViewedDate","LastReferencedDate"
"[ListView]","00B5h00000GAWN4EAP","All Open Leads","AllOpenLeads","","Lead","true","2021-12-27T23:21:45.000+0000","[User]","兪 思忠","2021-12-27T23:21:45.000+0000","[User]","兪 思忠","2023-09-08T15:07:23.000+0000","2023-09-08T15:07:23.000+0000"
"[ListView]","00B5h00000GAWPVEA5","My Unread Leads","MyUnreadLeads","","Lead","true","2021-12-27T23:21:45.000+0000","[User]","兪 思忠","2021-12-27T23:21:45.000+0000","[User]","兪 思忠","2023-09-08T15:07:23.000+0000","2023-09-08T15:07:23.000+0000"
"[ListView]","00B5h00000GAWPjEAP","Today's Leads","TodaysLeads","","Lead","true","2021-12-27T23:21:45.000+0000","[User]","兪 思忠","2021-12-27T23:21:45.000+0000","[User]","兪 思忠","2023-09-13T13:56:22.000+0000","2023-09-13T13:56:22.000+0000"
"[ListView]","00B5h00000GAWPuEAP","View - Custom 2","ViewCustom2","","Lead","true","2021-12-27T23:21:45.000+0000","[User]","兪 思忠","2021-12-27T23:21:45.000+0000","[User]","兪 思忠","2023-09-08T15:07:23.000+0000","2023-09-08T15:07:23.000+0000"
"[ListView]","00B5h00000GAWPvEAP","View - Custom 1","ViewCustom1","","Lead","true","2021-12-27T23:21:45.000+0000","[User]","兪 思忠","2021-12-27T23:21:45.000+0000","[User]","兪 思忠","2023-09-08T15:07:23.000+0000","2023-09-08T15:07:23.000+0000"
"[ListView]","00B5h00000GAWQGEA5","Recently Viewed Leads","RecentlyViewedLeads","","Lead","true","2021-12-27T23:21:45.000+0000","[User]","兪 思忠","2021-12-27T23:21:45.000+0000","[User]","兪 思忠","2023-09-05T15:32:48.000+0000","2023-09-05T15:32:48.000+0000"
关于ListView,详细可以参考下面的链接