-
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
How to Effectively Manage Ideas on Salesforce Experience Cloud
The idea-creation process is a journey with many twists and turns. Ideas can be born in a flash, then bounce around for days or weeks…
How the Salesforce1 Mobile App Can Help Businesses
To understand “how the Salesforce1 mobile app can help the business”, we must first understand the how and the difference between Salesforce and Salesforce1. The…
The Benefits of Salesforce Sales Cloud for your Business | The Ultimate Guide
In today’s competitive business environment, customer satisfaction and retention are key factors in achieving success. This is where Salesforce Sales Cloud comes into play. It is a…
Popular Salesforce Videos
How to Find the Job ID for a Test Send and Send Flow | Salesforce
This video will help you understand how to find the job id for a Send Flow and for a Test Send. 00:00 - Introduction 00:30…
Understanding Future Method | Difference Between Asynchronous and Synchronous Apex in Salesforce
In this video, Shrey explained Synchronous Apex and Asynchronous Apex in a simple way. He also explained the importance of the Future method in Salesforce.…
What is Record Types in Salesforce?
Record Types is where you have multiple page layouts to a specific profile. Watch this video to learn all about it.