Current User info in Aura Lightning JS controller or Comunity without apex
var userId = $A.get(“$SObjectType.CurrentUser.Id”);
var userId = $A.get(“$SObjectType.CurrentUser.Id”);
Sometimes we get such a scenario, we may need to create CaseMilestones– especially when you are doing data migration from Salesforce-to-Salesforce; but Salesforce does not allow to create CaseMilestone through custom means. But we can follow the below steps to insert it in new org same as we have in current org (assuming that you …
Description How to pass URL parameters to set filter values in Lightning Experience reports. When linking to reports or when bookmarking a report, add filter value parameters to the URL to customize how the report filters when opened. For example, bookmark your opportunities report and add a filter value parameter to specify whether you see New …
Filter Reports via URL Parameters in Lightning Experience Read More »
Requirement: a SAQL query to find the number of WEEKDAYS between two dates. Specifically, can use this SAQL query in a Compute Expression SAQL Expression: Here dataset name is “cases”. Start date is Created Date of a Case record and End Date is ClosedDate of Case. Algorithm is copied from here: https://help.salesforce.com/articleView?id=000004526&type=1.
1. Ensure “Enable Case Feed Actions and Feed Items” is enabled under support settings. To modify Support settings : Go | Setup | Customize | Cases | Support Settings. 2. If you do not find the setting “Enable Case Feed Actions and Feed Items” under support settings, make sure “Feed Tracking” is enabled for case object. To enable …
Why Email publisher action is not visible on Case though it is added to the page layout? Read More »
Description Implementing a custom domain for your community creates brand recognition and gives you additional control and functionality. We’ll go through how you can get your custom domain implemented. Prerequisites & Assumptions Steps to setup the masking Prepare Host-name for CNAME configuration from Salesforce: Get Salesforce 18 digits organization id. You can get that easily …
Here is the apex code to to achieve the same. Run in dev console then use in your test class or anywhere else you want:
DESCRIPTION It’s very typical to get such a scenario when we need to create custom field programmatically. Previously, we used to use Metadata API for the same which was very costly. But now, Tooling API provides an efficient way to achieve it. I’ve prototyped in below class. You can create custom fields as given below. …
Apex Code to Create Custom Field Programmatically Read More »
I developed a native solution which is really very fast to evaluate the boolean expressions. Inspired from here: https://salesforce.stackexchange.com/questions/113300/boolean-evaluation-in-apex/113306 Source Code link is: https://gist.github.com/ayub-ansari/d689fe390e0f7350ce6600a09335981f Example to use it: BooleanExpression.evaluateExpression(‘false and (false or (true and (false or true)))’);
PROBLEM STATEMENT SOLUTION Below given solution is use to Apex script to query Knowledge and make change and then publish in mass. This peice of code further can be used anywhere in Anonymous Window (Developer Console –> Debug –> Open Execute Anonymous window) or Apex Class/Trigger. Query Published articles and make desired changes (skip if …