Salesforce. AI. Web3
Security.stripInaccessible() Bug with Protected Custom Settings
This post is my attempt to reach out to Salesforce with a full narration of a bug in Security.stripInaccessible() method with protected custom settings only. Also, this could help any ISV Partners using Security.stripInaccessible() with protected custom settings and running into issues.
Testing SOAP Outbound Messages without failures
As suggested by Salesforce docs, one can use services like requestb.in or inspectb.in to test outbound messages. But these services are pretty generic so they just return 200 / OK response for any inbound…
Fighting and Fixing the “MIXED_DML_OPERATION” Error!
You can easily run into this error if you are trying to perform DML on setup and non-setup objects in the same transaction. Non-Setup objects can be any one of the standard objects, like Account or any custom object.
Here are a few examples of the Setup Objects:
Resolved: “Field is not writeable: Sobject__Share.RowCause”!
This post is about an issue that comes with Apex-managed sharing, i.e. System.SObjectException: Field is not writeable: Sobject__Share.RowCause. We faced this problem recently and tried searching…
Sorting Apex SelectOption Array/List
All Apex developers creating Visualforce pages with drop-downs and checkboxes use the Apex SelectOption class. On most occasions, instances of this class are created out of records in a database that we can query in a desired alphabetical order
How do you read cookies set by JavaScript in the Apex/Visualforce controller?
This might be a requirement, if you are developing some complex navigation…
Support of CDATA sections & Apex DOM classes!
I saw this tweet today about the apex-fast-xml-dom library. Unfortunately, it's true that FastXMLDom can’t support CDATA sections as of now. This is because FastXMLDom is a wrapper on top of Spring’10 Apex DOM classes, and DOM classes don’t support CDATA sections.
Invoking “Apex WSDL” Web Services from Apex Code
Apex programming WSDL can be downloaded from the “Setup” area of your Salesforce org. Just land on the “App Setup > Develop > API” page. Instructions to download are shown below:
HTTP Compression with Apache Axis, a huge performance boost!
As mentioned in my previous post, I was researching/benchmarking on how HTTP Compression with Apache Axis improves performance. The results I got post HTTP compression, are surprisingly amazing…
Working with Aggregate SOQL queries/results in Batch Apex!
What if you want to create a Batch Apex Job that uses SOQL having aggregate functions like SUM, MAX, and COUNT on top of results grouped by the “GROUP BY” clause? You can’t easily create a Batch job via QueryLocator, as shown below. When working with Batch Apex in Salesforce, you might encounter a scenario where you need to run SOQL queries with aggregate functions like SUM, MAX, or COUNT while grouping results using the GROUP BY clause.
Using Apex:Variable in Visualforce to control rendering of HTML Markup
This post is for developers working on Visual Force. I came across an interesting way to control the rendering of HTML markup; previously, I was using “<apex:outputPanel .. />” for controlling the rendering of some HTML markup. This approach works….
Custom Settings – Null Pointer Exception Quick Fix!
Custom settings in Salesforce are a valuable tool for development, but they can trigger unexpected Null Pointer Exceptions when deployed to new orgs without predefined records. This common issue arises from calling CustomSetting__c.getInstance() without any available data, resulting in runtime errors.
Salesforce Apex Default Values Explained!
force.com standard and custom objects allow you to define fields with default values. However, there is a major confusion regarding the usage and availability of default values in Apex code.