-
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
All You Need to Know About Change Set and Deployment in Salesforce
What are Change Sets? One of the tools that Salesforce offers for transferring information changes between orgs is change sets. A method for synchronizing the…
4 Major Advantages of Salesforce Einstein Analytics for Sales Managers
For many years, most of the Salesforce users were using reports and dashboards to quickly look up their data, perceive performance, and communicate results. But…
Top 5 Reasons To Hire a Salesforce Consultant Over an Internal Admin
Adopting Salesforce can be quite a challenging decision if marketers fail to understand the Salesforce platform and its capabilities. Many organizations want to get the…
Popular Salesforce Videos
Export Data from Salesforce using Data Loader - Step by Step Process
In this video learn how to Export Data from Salesforce to CSV using Data Loader. You can install Data Loader on Windows or Mac. And…
Salesforce Trailhead 2020 - Developer Beginner - Search Solution Basics
This video explains: Explain when to create a customized search solution. Describe the difference between SOSL and SOQL. Identify which API protocols are available for…
How Much I Earn as a Salesforce Consultant!
In this video, Adam Foyston gives a detailed look at the earnings of Salesforce consultants, how they compare to the earnings of Salesforce admins, and…