-
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
Reasons Why Projects Need Salesforce Developers
A professional project powered by Salesforce needs developing APIs, custom automation solutions, effective CRM workflows, integrating third-party tools, and maintaining a high quality of software…
Knowledge of Salesforce Flow and Different Type of Flows and Its Elements
What are Flows? In Salesforce, a flow is an application that automates complex business processes. Simply put, it collects data and then does something with…
Lightning Components & AuraEnabled Method : What’s Working & What’s Not?
Parameters Passing from Client-Side to Server-Side is the much-needed part for Lightning component development. Prerequisite to pass a parameter from client-side to server-side: Value of…
Popular Salesforce Videos
Automate Your App With and Without Code | Salesforce Developer Tutorial
In this video, you will learn how you can automate your business process with and without code. This video teaches you how to use a…
How I Really Feel About Salesforce
A deep dive into the state of the Salesforce industry in 2021, such as: - Is Salesforce going to crash in the foreseeable future? -…
Introduction to Salesforce Nonprofit Cloud for Program Management
Each nonprofit’s mission and the program is unique, but with Salesforce’s highly configurable and customizable platform, you can manage your entire program from one central…