Skip to content

Instantly share code, notes, and snippets.

{“Metadata” : {
“active” : true,
“businessProcess” : “Buyer Process”,
“compactLayoutAssignment” : null,
“description” : “This is used to capture Sales”,
{
“Metadata” : {
“businessOwnerGroup” : null,
“businessOwnerUser” : null,
“businessStatus” : null,
@ayub-ansari
ayub-ansari / CaseChangesPushNotification.cls
Created April 25, 2019 17:42
Custom Push Notification In Lightning Service Cosnole
public class CaseChangesPushNotification
{
public static void sendAgentMessage(String message)
{
Case_Event__e event = new Case_Event__e(Message__c=message);
Database.SaveResult result = EventBus.publish(event);
if (!result.isSuccess())
{
for (Database.Error error : result.getErrors())
{
global class CalloutController{
public static String requestLabel;
@RemoteAction
public static Object helpSupportAgents(String body){
Map<String, Object> jsonPayload = new jsonPayload()
jsonPayload.put('searchKeyword', body);
String endpoint = '<long running callout endpoint>';//I can not provide url due to security issue
Continuation searchContinuation = makeContinuation('callbackMethod', 'POST', endpoint, JSON.serialize(jsonPayload));
searchContinuation.state = searchContinuation.addHttpRequest(req);
return searchContinuation;
@ayub-ansari
ayub-ansari / BooleanExpressionCalculation.cls
Last active July 4, 2018 13:54
Boolean expression calculation apex - Salesforce
/*_________________________________________________________________________________
// BooleanExpression.evaluateExpression('false and (false or (true and (false or true)))')
//updated by ayub...may need to change
___________________________________________________________________________________
*/
public class BooleanExpressionCalculation{
public static boolean evaluateExpression(String expression){
system.debug(expression.containsIgnoreCase('false')+'__'+expression.containsIgnoreCase('true'));