10个销售人员面试必备问题 *
Toptal sourced essential questions that the best Salesforce developers and engineers can answer. Driven from our community, we encourage experts to submit questions and offer feedback.
现在就雇佣一名顶级的Salesforce开发人员面试问题
如果我们有两个页面和一个控制器, 这些页面使用相同的控制器, how can you retain the view state when a user redirects from one page to the other?
To retain the view state and use the previous page’s variable in a redirected page, we have to call setRedirect(假)
on a new PageReference
实例(例如,在按钮的单击处理程序中).)
SOAP APIs use WSDL files to make objects and database access available to Salesforce. REST可以基于JSON或xml,而SOAP只能基于xml. REST is most often used by mobile apps, while SOAP is used to connect with legacy systems. For example, 如果我们想用Salesforce连接SAP, 那么SAP将提供一个WSDL文件来连接到他们的数据库. We can use REST when a third-party system wants to extract data from or insert data into a Salesforce database.
We use insert
so that if any error occurs in any record, the system will throw a System.DmlException:插入失败
异常,则不会插入任何记录.
If we want to allow partially successful bulk insert operations, we use database.insert()
instead.
申请加入Toptal的发展网络
并享受可靠、稳定、远程 自由销售人员开发工作
批处理类是一个异步方法, 所以当批处理类运行时, 每个执行方法都在单独的线程中处理. Now if we have mentioned one list globally to update all of the processed records in a finish method, then we will need to make this batch class stateful to retain the values of global variables. Otherwise, each thread will have its own separate copy of all global variables, so none of them will add to the list used by the main thread’s finish method.
Write Apex code to fetch the picklist values from a particular object, e.g. the Display Industry
从Visualforce页面中选择列表值.
Schema.descripbefieldresult fieldResult =账号.Industry.getDescribe();
List ple = fieldResult.getPicklistValues ();
There are four types of sandbox org available with Enterprise Edition:
- Developer 提供200mb的数据空间
- Developer Pro 提供1GB的数据空间
- Partial Copy provides 5GB of data space, records (a sample of selected objects), and sandbox template support
- Full Copy is the same as a production org, with the same record ids the production records have
请注意,它们都提供:
- 内置于Salesforce中的标准配置
- 顶点和元数据
- 从生产中复制的所有用户
沙盒org类型的用途如下:
- Developer and Developer Pro这两者之间的唯一区别是它们的数据空间, they are both used to code and enhance existing functionality and then move it to production.
- Partial Copy: Generally, when we are dealing with large amounts of data and want to have real-time testing data, 那么这个沙盒是有用的,因为Salesforce提供了多达10个,生产数据中每个对象的000条记录.
- Full Copy: When you want to replicate a production issue in a sandbox and fix it, 那么这个沙盒是最合适的. That’s because even if you wanted to debug directly in production, you can’t. Also, 有时是为了重现问题并修复它, 我们需要完全相同的数据, 这就是完整复制沙盒带给你的.
Can we call a class method from a custom button of an object without using a Visualforce page? If so, how? If not, why not?
是的,我们可以从自定义按钮调用类方法. 调用一个类的方法, 我们需要在自定义按钮中使用连接JS和Apex JS, and then we can call the Apex class method using the following syntax:
{!requireScript(“/ soap / ajax / 20.0/connection.js")}
{!requireScript(“/ soap / ajax / 20.0/apex.js")}
retStr = sforce.apex.执行("SampleClass", "SampleMethod",{方法的参数});
Note: The class you are calling must be a global or Webservice class.
Write Apex code to get the first date and last date of a month given in a string field where values are in the format 06-2018
,使用系统提供的方法.
Because the string is not a full date, we cannot use functions like Date.parse()
. 现在我们设字段名是 month
:
FirstDate = date.newInstance(月.分割(“-”)[1].split('-')[0],1);
LastDate = firstDate.addMonth(1).addDays(-1);
A wrapper class is an outer class that we use to bind values or objects which are not available in the inner class.
Use cases:
- Let’s say we want to display account records and we want to let the user select a record to perform an action on. We can create a wrapper class with one field as a boolean value and another as an account object, 把两者结合在一起.
- A wrapper class is also used when we have to display data in a matrix format.
- If we want to show a scoreboard of recruiters from a placement object in a table, then we need to use a wrapper to store the recruiter name and corresponding score. 因为有很多职位和招聘人员, 我们必须将给定的实习编号映射到招聘人员, and only then can we bind recruiters with scores and display them in a table.
What is heap size, and what is its limit for asynchronous and synchronous calls? When the heap size limit is exceeded, how can you resolve that issue?
Heap size is the size of the temporary storage of your data while executing your code in synchronous mode. 所有的全局变量都存储在堆上. 对于异步模式, 堆大小限制为12 MB, 对于同步模式, 堆大小限制为6 MB.
要减少堆大小,请采取以下步骤:
- 如果不需要,减少使用全局变量.
- 如果没有必要,避免使用太多的地图. Try to reuse maps that are already defined if you’re using them for the same purpose later on, or call
clear()
当你用完它们来释放堆空间时. - 使用过滤器来避免存储不必要的数据
List
andMap
. The heap size mainly increases due to storing data retrieved from a database in a variable. 所以如果数据不是必需的,那么我们应该clear()
他们在我们完成我们的一个特定的使用Map
orList
. - 避免使用嵌套
for
loops. If there is no way to avoid nested loops then put filter conditions in such a way that you can reduce execution statements.
面试不仅仅是棘手的技术问题, 所以这些只是作为一个指南. Not every “A” candidate worth hiring will be able to answer them all, 回答所有问题也不能保证成为A级考生. 一天结束的时候, 招聘仍然是一门艺术,一门科学,需要大量的工作.
Why Toptal
提出面试问题
提交的问题和答案将被审查和编辑, 并可能会或可能不会选择张贴, 由Toptal全权决定, LLC.
寻找Salesforce开发人员?
Looking for Salesforce开发者? 看看Toptal的Salesforce开发人员.
David Tanura
David is a senior Salesforce solution and technical architect able to understand and articulate business and its needs to design and implement solutions built on the platform. Highly aware of business processes, he thrives in adding value by designing and building solutions. Always learning new and complementary technologies and approaches to deliver positive outcomes to the business. 他的行业包括金融科技, 金融服务, pharma, FMCG, 房地产开发, and technology.
Show MoreJenn Sanders
Jenn is a Salesforce aficionado driven by challenges and good at what she does because she cares. 作为一个在Salesforce领域工作了16年的老手, 她专门研究科技的交叉领域, people, and process. Together, she'll build your dreams, overcome your problems, and accelerate your business. Jenn是一位为可伸缩性而构建的架构师, 为易读性进行配置的作者, 也是一个授权领养孩子的教育家.
Show More格里高利Lovelidge
Gregory is a driven senior Salesforce consultant and developer with 10+ years of experience seeking remote opportunities. He's adept at formulating technical solutions and executing project plans from conception to completion. He focuses on collaborating closely with clients to identify project objectives, specifications, and solutions.
Show MoreToptal连接 Top 3% 世界各地的自由职业人才.
加入Toptal社区.