![](https://img-blog.csdnimg.cn/20200918162351533.png?x-oss-process=image/resize,m_fixed,h_224,w_224)
Salesforce Experience
文章平均质量分 75
本专栏涵盖了sales cloud,marketing cloud,service cloud的所有基础知识和项目经验总结,对项目中的各种疑难杂症给出了详实的解决方案,同时作者还会更新以往博客中的错误观点和补充对知识点的最新理解,争取为博友提供最新最全的学习体验。
sf_wilson
https://www.linkedin.com/in/sf-wilson/
展开
-
[Transactional Level Bypass] Bypass Validation Rule in Apex Batch Class
假如当前批次需要更新5条Lead,其中仅有1条Lead触发了validation rule。同时,由于没做try catch处理,订阅exception email后会收到apex exception通知。现有一个batch job用于批量更新Lead,最近频繁收到apex exception email, 显示更新Lead的时候触发了validation rule,导致apex job运行失败。为确保batch job不受脏数据都影响,我们需要绕过validation rule。原创 2024-04-30 17:24:12 · 266 阅读 · 1 评论 -
[API Callout] Named Credential + External Credential
【代码】[API Callout] Named Credential + External Credential。原创 2024-03-04 21:49:19 · 348 阅读 · 0 评论 -
Salesforce特别元数据部署技巧
【代码】Salesforce特别元数据部署技巧。原创 2023-08-14 16:42:35 · 190 阅读 · 0 评论 -
FY23 New SF Features Overview
【代码】Spring ‘23 New SF Features Overview。原创 2023-05-07 17:22:41 · 479 阅读 · 0 评论 -
Object Manager中的Hierarchy Columns
4. 需要注意点是,在Account上创建Hierarchy Columns时,系统会默认增加Org_Account_Hierarchy list view, 这样就不用去Detail页面点击button查看。】:最近偶然发现Object Manager中多了一项Hierarchy Columns,正好在做Case Mgmt这块的业务,需要做Case Hierarchy,或许熟悉这个新概念对后续方案的落地有一定启发。顾名思义是定制colunms需要包含哪些字段,这些字段的顺序是什么。原创 2023-04-21 16:18:13 · 328 阅读 · 0 评论 -
[Spike] Consumer Details Rotation Mgmt on Managed Connected App
Q1. Is it the best practice to periodically rotate the consumer key & consumer secret in salesforce connected app?Q2. If ISV rotates the consumer details in managed connected app, shall we upgrade the package and force subscriber to update the managed pack原创 2023-03-23 10:31:27 · 294 阅读 · 0 评论 -
Apex工具 | 将一个list分割成n个list
【代码】Apex工具 | 将一个list分割成n个list。原创 2023-03-12 13:41:28 · 161 阅读 · 0 评论 -
[Spike] Flow with Validation Rule
也需要在flow中再次写需要的validation,而非通过object上的validation rule 验证。:更加复杂和多样的validation rule,decision后用单独的screen来显示错误信息。:错误信息显示不能对应到具体的input,需要用户手动点击“previous”返回。:不用单独在flow中添加验证的逻辑,单独的screen显示错误信息。:在screen跳转前校验,在具体的input框下显示错误信息。:错误信息不能直接在input下显示,以单独的screen显示。原创 2023-02-28 11:05:12 · 310 阅读 · 0 评论 -
Integration Architecture
选择Per User,需要User配置在My Settings中提前设置账密:Identity Type:原创 2022-12-06 20:13:24 · 121 阅读 · 0 评论 -
Streaming API Demo
Test in workbenchCreate Account, Update Name on Account, Delete Account, Undelete Account via SF UI.原创 2022-12-03 09:41:25 · 181 阅读 · 0 评论 -
Aura Component Cope Snippets
常用aura代码片段集锦原创 2022-09-29 15:46:08 · 169 阅读 · 0 评论 -
Salesforce Integration - OAuth2.0 JWT Bearer Flow
通过JWT授权方式获取access_token,然后使用access_token call Salesforce API访问数据。#1. 通过openSSL获取下面4个文件:#2 将server.crt上传到Connected App:#3. 将本地的和通过terminal转化成JKS File,然后修改keystore的,最后在Certificate and Key Management通过Import from Keystore将JKS File保存到Certificates相关列表。可通原创 2022-06-16 15:36:32 · 773 阅读 · 1 评论 -
删除Salesforce记录类型RecordType - 非常规
【场景描述】:在Empty sandbox的时候,需要删除RecordType,而删除前必须解依赖,具体步骤如下:1. 将某对象RecordType依赖在Profile里面RecordType Settings中解除2. Inactive RecordType - 可用Metadata API修改Active状态为false3. 删除【问题】:第一步操作已经解除了大部分Profile依赖,但是遇到两个Profile比较怪,有2点怪象:1. Platform Integration Us.原创 2021-07-13 16:57:25 · 444 阅读 · 0 评论 -
Data Model中特殊对象字段定义类比
【前言】:此专题提供Salesforce关键对象的字段定义可选项一览,方便我们快速选择合适的Data Model。1. External Object2. Custom Metadata Type3. Big Object4. Std - User5. Std - Account6. Std - Contact7. Custom - Master Object8. Custom - Junction Object:...原创 2021-07-10 12:15:26 · 171 阅读 · 0 评论 -
How Salesforce Developers Handle Errors with Try, Catch, & Rollback Best Practices
Stop, Drop, and RollbackSmokey The Bear Says — Care will prevent 9 out of 10 Apex errors!Exceptions note errors that disrupt the normal flow of code execution. Try/catch blocks provide a strong defense in finding resolutions for these exceptions.When转载 2021-05-26 15:34:49 · 876 阅读 · 0 评论 -
使用VS Code部署Connected App - Connected apps must have a unique consumerKey
【精华摘要】:由于原文过于优秀,为保证原汁原味的阅读体验,请看完精华摘要后也享受下原文带来的冲击感!使用vs code成功部署connected app,需要调整两项:#1. callbackUrl - 以做SSO为例,填写Auth. Provider的Callback URL#2.consumerKey - 清除 (该字段不可写,部署后会自动生成)Deploying a connected app is more likely to succeed if the unique cons.转载 2021-04-01 11:43:37 · 247 阅读 · 0 评论 -
在Salesforce中基于SAML 2.0搭建SSO并启用JIT User Provisioning(SF Orgs间 / SF Org与Experience Cloud间 / 其他IdP)
【问题与方案】:Q1、使用下图Community Login Page进行单点登录时报错如下:AADSTS50105: The signed in user {email address}is not assigned to a role for the application '{tanent id}'(SixDeep-Salesforce).A1、登录Azure Portal,在Azure Services板块点击Azure Active Directory,进入tenant后点选.原创 2021-03-15 11:32:08 · 1701 阅读 · 0 评论 -
Salesforce项目中使用ETL工具做数据迁移
【前言】:前4年中,参与过的数据迁移工作并不频繁,而且使用的方法也很传统,大多数重复性的工作都是手动对csv源文件在Excel上做导入前的处理,大体包括:#1. 数据mapping(有时需要将原对象拆表满足CRM数据结构)#2. 统一数据类型#3. 数据清洗,如去重 / 调整数据格式(譬如,将phone中的area code与phone分离)#4. 数据默认值填充#5. 数据ownership的对应这类工作看起来很简单(就是把旧系统数据转存在新系统中),因此在实施中很容易被客户和领导低估。原创 2021-02-14 13:30:54 · 965 阅读 · 0 评论 -
Salesforce中实施Campaign Influence模型注意事项
【前言】:在19年8月份的时候,为地产行业客户实施了一套简要的Campaign Influence模型,目的是帮助房产公司市场部同事了解什么类型的Campaign有助于产生新的商机,及最终成单(即了解客户成功购买归因,通过哪些市场活动触点最终进入销售关键节点),并最终计算ROI (Return On Investment)。项目落地后的一段时间工作重心放在了金融行业客户上,到21年回归地产项目数月后,在调查代码覆盖问题,及影响范围和程度时,偶然看到了相关代码的变动,因此重新测试发现确实存在一些亟待解决的问题原创 2021-01-21 18:27:48 · 493 阅读 · 0 评论 -
Salesforce邮件发进垃圾邮箱或未收到SF邮件处理方式 (DKIM - New CNAME Version)
【前言】:在实施CRM项目时,经常会听到客户反馈诸如重置密码邮件没收到 / 进入到垃圾邮箱的问题,通常这对于我们开发人员来说很难协调客户一起去重现并点对点的解决这个问题(毕竟于我们而言这种问题同样新),因此对于这类常见问题,通过广泛的调研与有效的实践后,本文将力图结合在Sales Cloud和Marketing Cloud以及Pardot等与Email相关问题给出可行的建议。【为什么会出现这种问题】:在商业活动中邮件的目的大致分为以下三类:a. 系统通知类,如重置密码,关单通知等;b. 事务类,原创 2021-01-06 14:36:43 · 2575 阅读 · 0 评论 -
INSUFFICIENT_ACCESS_ON_ CROSS_REFERENCE_ENTITY APEX / SALESFORCE
NOTE: A common cause for this issue is the below scenario. Read on, if that's not the case for you.*If you are trying to share "Record X" with "User Y" and "User Y" already has access to "Record X" this error happens.Even though i understood what this me.转载 2021-01-04 18:21:48 · 695 阅读 · 0 评论 -
What every Salesforce developer should know about Dates and Times in Apex
Dates, times and computers have never been the best of friends. Just look at the list of famous bugs caused by miscalculations in Dates and Times:the famous y2k bugs which cost over $300 billion worldwide to address, the Deep Impact spacecraft which wasl..转载 2020-12-26 13:44:44 · 315 阅读 · 0 评论 -
Salesforce运行所有测试类并获取覆盖率报告
【参考资料】:https://skaruz.com/salesforce-how-to-get-the-code-coverage-of-a-class-org/https://appexchange.salesforce.com/listingDetail?listingId=a0N3A00000EFoy9UADhttps://help.salesforce.com/articleView?id=000332406&type=1&mode=1https://jayakrishnasfdc.原创 2020-12-02 18:41:42 · 519 阅读 · 0 评论 -
Salesforce发布的振奋人心的新功能集锦
【前言】:在我们夜以继日地交付项目的时候,作为厂商的SF以其庞大的资源优势及雄厚的技术实力,集结着各行各业的专家在CRM领域深耕细作,以技术视角探索着促进销售的新契机,并最终用现代化技术和理念的成果持续为企业赋能!作为SF项目的实施者,当我们从项目中释放的时候,正好有时间去细细品味SF在CRM产品上的用心。怀着对厂商感激的心情,通过这篇博客记录那些SF给我眼前一亮的新功能,愿与君共睹!本文将继续遵循倒序的排列风格,方便大家在最短的时间获取最新的信息。【01 User Engagement -> I原创 2020-11-13 18:23:50 · 251 阅读 · 0 评论 -
Salesforce中解析合并字段Merge Fields
【前言】:在Salesforce中用到Merge Fields的地方很多,如Process Builder,Workflow,不过最容易想到的场景是在Email Template的使用。如果你仔细比较Merge Fields编辑器,你会发现对象与字段的联动还有些不一样的地方,不论如何其本质还是在后台构造SOQL,然后基于有限的参数线索(如WhatId或WhoId)检索值。本文将结合一个具体的案例介绍关于Merge Fields解析的通用解决方案,并在此过程中说明现有方案的技术边界,以及讨论如何找到更泛型的方原创 2020-11-04 18:30:08 · 624 阅读 · 0 评论 -
Salesforce Dynamic Dashboard动态报表、限制与解决方案
【前言】:在验证Sharing Settings中User Visibility Settings对记录访问的影响[14]时,创建dynamic dashboard供不同用户登进community按running user身份渲染dashboard数据,在保存dashboard时,报错如下:[Error: You reached the limit for dashboards run as the logged-in user.],此篇博客将探索什么是dynamic dashboard,限制与解决方案。原创 2020-09-10 14:15:48 · 764 阅读 · 0 评论 -
在Salesforce Validation Rule中使用Vlookup方法
【参考资料】:Salesforce VLOOKUP Example Salesforce: VLOOKUP原创 2020-09-07 19:00:34 · 340 阅读 · 0 评论 -
Salesforce File Share and Security
File Share and SecurityFile Sharing VisibilitiesNAME DESCRIPTION Private File is not shared with anyone. Like private report folder, file in private library can only be accessed by file owner. A file can specifically set "Make Private" to原创 2020-09-04 15:10:59 · 302 阅读 · 0 评论 -
Profiles vs Permission Sets
Do not confuse Profiles and Permission Sets with RolesThe profiles and permission sets are configuration items in Salesforce that will allow us to control different types of functionalities and the roles with allow us to control record visibility primari转载 2020-09-02 12:26:27 · 346 阅读 · 0 评论 -
Salesforce Data Sharing & Visibility —— Performance & Scalability
Guideline for Performance and ScalabilityGiven a particular complex customer org setup, design asecurity model that is maintainable at large scale.Group Membership and Sharing RecalculationSalesforce Role Hierarchy, Public Groups, and Territoriesare..转载 2020-09-01 18:50:46 · 2022 阅读 · 0 评论 -
使用多种方式导出Salesforce Object Definitions对象定义表
【前言】:前段时间被一位刚入行的同学私信问到"如何快速导出ERD和对象定义表"的问题,KT一波后,明显感受到那位同学使用高效工具后的喜悦(至少节省了大半天的时间)。如果说我们把工具带来的高效视为利己,那么如何进一步做到利他呢?正好最近很幸运地被问到一个问题,让我有机会思考项目实施中如何做到利己又利他。【背景】:Admin反映客户某个对象A上有1,2,3,4,5个记录类型,每种记录类型对应使用着不同字段,很早前(上上个接手团队T1)为了很好区分哪个字段是用于哪个记录类型的,如在记录类型1,2上有意的在创建原创 2020-08-26 12:28:13 · 1010 阅读 · 0 评论 -
Salesforce: Activity Controlled by Parent VS Private
In Salesforce.com, forActivityobjects (Task & Event), there are only 2 option in the Organization-Wide Defaults sharing setting:- Controlled by Parent- PrivatePrivateOnly activity owner (label asAssigned To), and users above the activity owner in...原创 2020-08-17 10:58:32 · 466 阅读 · 0 评论 -
使用SFDX-Deploy-Tool删除Metadata
【背景】:在探索Data Sharing & Visibility Designer模块时,想基于复杂的Role Hierarchy来做POC(比如Business Unit底下增加Territory地域维度,并将Partner Community和Salesforce不同类型User Type的Role Hierarchy衔接在一起),以深入理解这方面的知识。我们知道一个DE Org最多有2个Salesforce License和5个Partner Community User License,在原创 2020-07-30 14:35:29 · 476 阅读 · 0 评论 -
Apex CPU time limit exceeded Errors
If your org has a lot of synchronous triggers or Process Builder flows, you may occasionally see a message like "Apex CPU time limit exceeded" when inserting or updating records. It may look like the following:geopointe.GP_Account: System.LimitException: A转载 2020-07-01 18:51:21 · 702 阅读 · 0 评论 -
Salesforce LEX常见限制总结
1、【自定义VFP List Button在Community中无法使用】:Use Visualforce in Lightning CommunitiesIf you’ve created Visualforce pages, actions, buttons, links, and canvas apps for your Salesforce Tabs + Visualforce template-based communities, they can be used in Lightning原创 2020-06-16 11:48:12 · 376 阅读 · 0 评论 -
在Visualforce Page中正确显示用户区TimeZone的DateTime
【前言】:在Salesforce中,Date和DateTime值是以GMT形式存储在DB中,我们可以使用apex:outputText标签输出GMT格式的Date和DateTime,这样一来,如果我们在开发中忽略时区这一概念,就会出现问题,特别是当GTM格式的DateTime为:27/04/2020 00:00这种0时。本篇旨在在VFP中解决日期或时间格式化的问题。【代码示例】:public class TimeZoneController { public TimeZoneContro原创 2020-05-22 17:04:12 · 384 阅读 · 0 评论 -
如何批量删除Salesforce中Picklist值
【前言】:就目前来说,SF没提供任何批量删除picklist值的方法(包含Metadata),参见Idea Details,根据sf官方回复,这个功能并不在未来2-3个发布计划路线图里面;【短期解决方案】:从调研结果看,目前有两种方式能帮助我们节省时间:1. 在console里边允许js,通过找到page上的删除按钮,执行异步操作模拟用户点击事件;参考自:Mass deleting picklist values in Salesforce with AJAX javascript hack (原创 2020-05-19 18:34:32 · 572 阅读 · 0 评论 -
【Salesforce工具篇】Ant Migration Tool Guide 从入门到深入
1、【下载安装与配置】:以Win10为例先决条件:安装Ant Migration Tool前,Java和Ant必须被正确地安装和配置(推荐Java v1.8.x+,TLS1.2,Ant v1.10.x+,Ant Migration Tool v48.x+),可以用如下方法检查是否符合条件:a. 打开cmd,并输入"java -version",如下:b. 输入"ant -version",如下:如果不符合条件,请参考【Salesforce工具篇】正确配置Data Loader环境下载Java J原创 2020-05-10 13:12:51 · 725 阅读 · 0 评论 -
盘点Salesforce Email Service相关问题
【Outbound Email Service】:2、【使用自定义Email Template】:String formattedText = String.format(template, args);trigger Trigger_Task_Send_Email on Task (before update) { Set<Id> ownerIds = new Se...原创 2020-05-08 10:52:40 · 2479 阅读 · 0 评论 -
使用Data Loader Command Line Interface定时同步数据到Salesforce(step by step with sample)
【前言】:在做某项目时,客户说他上一个Vender实施的定时同步数据这段时间出故障了,在没有足够业务背景情况下,我调查了相关数据集成的代码,并没发现sf上有任何数据集成或者定时任务,几经周折后,客户发了第一波实施文档,发现它们是由Data Loader在做定时同步数据。那么疑惑来了,这个Data Loader是我们平时用到的Data Loader吗?并没有发现它有定时同步数据的功能呀。直到准备A...原创 2019-03-20 17:14:13 · 1118 阅读 · 3 评论