-
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

Using Custom Settings in Salesforce
In Salesforce, both developers and administrators have made custom apps. Developers have used AppExchange to upload packages. Custome Apps uses the custom setting for that…

File Upload in Lightning Web Component | Salesforce Lightning Tutorial
Users can upload many files quickly and easily with the lightning-file-upload component. Drag and drop capabilities and file type filters are also available in the…

CTI Integration With Salesforce: Streamlining Your Business for Maximum Efficiency
In today's fast-paced business world, it can be difficult to keep up with the demands of customers while still maintaining a high level of productivity.…
Popular Salesforce Videos
How to Use Product Rules with Salesforce CPQ
In this demo video, you'll learn about the three most popular types of product rules for CPQ: validation, alert, and selection. You'll also see how…
Basics of Salesforce Flow in 15 minutes
In this video, Jitendra Zaa gives a detailed overview of the basics of Salesforce Flow in just 15 minutes. He covers everything from how to…
A Year of Innovation and Growth for Kizzy Consulting - Top Salesforce Partner!
2023 was an amazing year for Kizzy Consulting - Top Salesforce Partner! We achieved the status of Salesforce Ridge Partner, completed numerous Salesforce certifications, and…