Skip to content

Instantly share code, notes, and snippets.

View goravseth's full-sized avatar

Gorav Seth goravseth

View GitHub Profile
global class License_Upgrade implements Database.Batchable<sObject> {
global Database.QueryLocator start(Database.BatchableContext BC){
// Query all active users with Profile : 'Base Programs'
String query ='Select UsersId,Users.ProfileId,Users.UserPermissionsMarketingUser,Users.Name, LastModifiedDate,LoginType,createddate,SessionType From AuthSession Where LoginType = \'Application\' and SessionType = \'UI\' and createddate = today and lastmodifieddate = today Order by lastmodifieddate';
return Database.getQueryLocator(query);
}
global void execute(Database.BatchableContext BC, List<AuthSession> AuthSesuserLst){
Profile p = [SELECT Id, Name FROM Profile WHERE Name= 'Base Programs' LIMIT 1];
@goravseth
goravseth / Screensteps API External Service Definition - Beta2
Last active August 7, 2020 21:59
external service definition to pull in screensteps articles to flow. can search title, tags, text, and can pass site ID as a parameter.
{
"swagger": "2.0",
"info": {
"description": "defaultDescription",
"version": "0.1",
"title": "defaultTitle"
},
"paths": {
"/{site}/search": {
"get": {