-
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
Different Types of Sandboxes in Salesforce
What is Sandbox? A copy of the production organization is known as a sandbox. Sandboxes allow you to create multiple copies of an organization in…
Unlocking Excellence: The Benefits of Hiring Dedicated iOS Programmers
In the rapidly evolving world of mobile app development, having a dedicated iOS programmer can make a substantial difference in the success of your projects.…
Export and Import Functionalities in Salesforce | All You Need to Know
To move attachment data from one Salesforce org to another, from one object to another, or to import from one place, you must follow two…
Popular Salesforce Videos
How to Find Job as a Fresher in Salesforce - Tips and Tricks
In this video Rohit Puri gives a detailed explanation of the questions that everyone has regarding Salesforce jobs, how to find jobs in Salesforce on…
Salesforce Winter Release '22 Highlights
Watch this webinar video to learn about new and improved features and how you can take full advantage of the latest enhancements. Let us know…
Salesforce Demo - Sales Dashboard Example
Our team created a comprehensive sales dashboard for one of our clients. We're posting this video about it to generate feedback and additional ideas for…