-
Test Database.query
We have our managed package and we need to install in another org. And there are many custom fields which already exist there. So we cannot create the custom field in our org because it will cause the duplicate issue. So how should i write the test method to cover the dynamic query custom fields?
I am using dynamic query to query records like
List<Account> accList = Database.query('select Name,customfield__C from Account');
as customfield__C is not present in my org it's value getting retrieved dynamically , so how to give customfield__C value in my test class.
Log In to reply.
Popular Salesforce Blogs
8 Foolproof Steps to Salesforce Classic to Lightning Migration
Migrating any critical software requires addressing the related complex challenges and preparing a clear roadmap for implementation. As the work environment and resources of every…
Send Salesforce Campaign Members to MailChimp for Email Marketing
After successfull installation and configuration of MailChimp for Salesforce app, Please follow the steps to add Campaign Members to the MailChimp List directly from the…
Popular Salesforce Videos
Salesforce Summer 20 Dynamic Forms
Salesforce’s Summer ’20 Release Notes have now been published, we can now dive under the hood to see what the top features are! Historically, Summer…
Use Aura Component in Screen Flow | Salesforce Flow Builder Tutorial
Hello Trailblazers, In this video, we will learn how to use Aura Component in Salesforce Screen Flow. How to validate the Lightning Component Input from…
Sandbox Design Strategies for Enterprise Implementations
It is inevitable to avoid Sandboxes in most enterprise implementations. As different teams work on different processes like testing, development, pre-release, and final rollout, it…