-
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
Everything You Should Know Before You Consider Salesforce CRM Integration
These are the times when every company expects a valuable contribution from customers. The role of customers is pivotal in the growth of any business,…
Top New Features of Salesforce Sales Cloud Summer’20 Release
Aloha! It’s that time of the year again, another release is just around the corner, which means we have a whole load of new features…
Integrating Salesforce with AI and Machine Learning Tools | The Ultimate Guide
Salesforce is a cloud-based customer relationship management (CRM) platform that helps businesses manage their sales, marketing, and customer service operations. Integrating Salesforce with AI and…
Popular Salesforce Videos
Salesforce Winter 21 Release - Sneak Peek
The Winter ’21 release delivers innovations across the Salesforce Customer 360 platform to help connect you to your customers, from anywhere. Fancy table updates, live…
How to Prepare for Salesforce Admin Certification | Salesforce Training
This "How to prepare for Salesforce Admin Certification" video by Edureka will firstly help you understand who is a salesforce admin. Then, it will talk…
Gantt Charts in Salesforce Lightning | Salesforce Tutorials
In this video, you will learn to implement the Gantt Chart in your Salesforce org. We will use Google Gantt Chart scripts and we will…