-
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
Unleashing Potential: A Strategic Roadmap to Salesforce Staff Augmentation
In the vast landscape of business evolution, there exists a compass that navigates the treacherous waters of innovation and efficiency—Salesforce staff augmentation. This strategic beacon…
Popular Salesforce Videos
Multi-factor Authentication in Salesforce | Setup of MFA
Multi-factor Authentication in Salesforce: Salesforce offers simple, innovative MFA solutions that provide a balance between strong security and user convenience. Because your business requirements and…
Best Chrome Extensions for Salesforce
These are the best FREE Chrome Extensions to use with Salesforce. Installing Chrome extensions is the easiest way to enhance your experience on the Salesforce…
How to Send a Pardot Email with Multiple Line Items | Salesforce
It is impossible to send a Pardot email that has a list of related records… or is it? In this session, Adam Erstelle uncovers strategies…