Create a Knowledge Base Article from Apex Dynamically without knowing article type API name
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:
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 …
Static Apex Code Check Review and Analysis in Salesforce involves assessing the quality, performance, security, and maintainability of Apex code before deployment. In order to develop any app in Salesforce for AppExchange, we must need to follow the security guideline to pass the security review. Here’s a structured approach for performing such a review: Code …
Static Apex Code Check Review and Analysis – No Need of Checkmarx Read More »