-
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
Managed Services vs. In-House Salesforce Management: Choosing the Best Fit for Your Business
In today's competitive business landscape, Salesforce has emerged as a leading CRM platform, empowering organizations with tools to streamline operations, enhance customer experiences, and drive…
Salesforce CPQ Consulting and Its Key Important Features
Salesforce CPQ (Configure, Price, Quote) is a suite of tools that helps businesses automate and streamline the process of creating and managing sales quotes, proposals,…
Lightning App Manager in Salesforce - All you Need to Know
Lightning App In Salesforce An app is a group of components that work together to accomplish a certain task. With Lightning Experience, your users can…
Popular Salesforce Videos
Slack API Integration for Salesforce Marketing Cloud
Connect Salesforce Marketing Cloud and Slack the way you want. Watch this video to learn all about Slack API Integration for Salesforce Marketing Cloud. If…
Introduction to Salesforce Marketing Cloud
Hello Everyone, In this video, by Amit Singh, we will talk about the basic introduction of the Marketing Cloud in Salesforce. Watch the video and…
Setting Up Service Territories and Operating Hours | Salesforce Webinar
Scale your business and ensure optimized performance by setting up service territories in Salesforce Field Service. In Salesforce Field Service, operating hours represent service territory…