Building Applications with Force.com and VisualForce(Dev401)(十六):Data Management: Introduction to Upsert
Dev401-017:Data Management: Introduction to Upsert
Module Objectives
1.Define upsert.
2.Define external ID.
3.List typical use case where upsert is useful.
4.List typical use case where upsert with relationships is useful.
5.Explain how external IDs are used in combination with upsert.
6.Explain some advantages of making use of an external ID field in a Force.com application.
Upsert
1.Upsert is an API function that combines insert and update into a single call
2.Upsert users an indexed custom field or external ID to determine whether to create a new object or update an existing object.
- If the external ID is not matched, then a new object is created
- If the external ID is matched once, then the existing object is updated
- If the external ID is matched multiple times, the an error is reported
3.Use Upsert when importing data to prevent the creation of duplicates.
External IDs
1.External ID is a flag that can be added to a custom field to indicate that is should be indexed and treated as an ID.
2.Custom index on any custom field of type Text, Number or Email.
3.Available on all objects that support ustom fields.
4.User-defined cross-reference field.
5.Why is ti important?
- Increases report and API SOQL performance
- Used with upsert to easily intergrate apps with other systems
6.An object can have three(3) External ID fields.
Upsert and External ID Typical Use Case
1.Legacy Position records in and old Recruiting Application have a Legacy Position Number.
2.Create a custom text field called Legacy_Position_Number on the Salesforce Position object. Flag the new field as an external ID.
3.When importing Position data from Legacy system to Salesforce, use the Upsert function in combination with the Legacy_Postion_Number field instead of using the Crate or Update API calls.
Upset with Relationships
1.Allows use of relationships defined in legacy systems when importing data into Force.com apps.
2.Configure upsert action to traverse object relationships defined in your Force.com app, but use external IDs from legacy system to discover Force.com record IDs.
3.No need to know Force.com records IDs to load data!
4.Very convenient for intergrations and migrations
- Shifts more of the work Salesforce.
Review
1.What is the advantage of performing upserts rather than creates on large data sets?
Prevent duplicates;external ID
2.How do you make a field an External ID field?
Checkbox
3.Do you have to know the Salesforce IDs of records in order to use Upsert with relationships?
No
Building Applications with Force.com and VisualForce(Dev401)(十六):Data Management: Introduction to Upsert的更多相关文章
- Building Applications with Force.com and VisualForce(Dev401)(十五):Data Management: Data management Overview
Dev401-016:Data Management: Data management Overview Course Objectives1.List typical data management ...
- Building Applications with Force.com and VisualForce(Dev401)(十八):Visualforce Pages: Introduction to Visualforce
Dev401-020:Visualforce Pages: Introduction to Visualforce Course Objectives1.Understand the benefits ...
- Building Applications with Force.com and VisualForce(Dev401)(十):Designing Applications for Multiple Users: Building Business Processes that You Want
Dev401-011: Building Business Processes that You Want Course Objectives1.Describe the capabilities o ...
- Building Applications with Force.com and VisualForce(Dev401)(十九):Visualforce Pages: Visualforce Componets (Tags)
Dev401-020:Visualforce Pages: Visualforce Componets (Tags) Module Agenda1.Tag Basics2.Tag Bindings T ...
- Building Applications with Force.com and VisualForce(Dev401)(十四):Implementing Business Processes:Auditing Processes
Dev401-015:Implementing Business Processes:Auditing Processes Module Objectives1.list some of the fe ...
- Building Applications with Force.com and VisualForce(Dev401)(十二):Implementing Business Processes:Automating Business Processes Part 1
ev401-013:Implementing Business Processes:Automating Business Processes Part 1 Module Objectives1.Li ...
- Building Applications with Force.com and VisualForce (DEV401) (四):Building Your user Interface
Dev 401-004:Application essential:Building Your user Interface: Module Agenda1.Custom Applications2. ...
- Building Applications with Force.com and VisualForce (DEV401) (三):Application Essential:Building Your Data Model
Dev 401-003:Application Essential:Building Your Data Model Object Relationships1.Link two objects- P ...
- Building Applications with Force.com and VisualForce (DEV401) (二) : Application Essentials:Designing Application on the Force.com Platform
Dev 401-002:Application Essentials:Designing Application on the Force.com Platform Course Objectives ...
随机推荐
- Gradle的依赖方式——Lombok在Gradle中的正确配置姿势
写过java的都知道,lombok几乎在项目中处于不可或缺的一部分,但是lombok在Gradle的项目中配置并非人人都知道. 很多人在项目依赖中直接这样写 1 compile "org.p ...
- IPFS初窥
虽然区块链有很多令人兴奋的特性,但是也有其固有的缺点.比如,文件或者长度较长的文本信息就不适合存储在链上.那么如何解决这个缺点呢?一个解决方案就是IPFS(Interplanetary File Sy ...
- 参考C# 使用 System.Web.Script.Serialization 解析 JSON
参考C# 使用 System.Web.Script.Serialization 解析 JSON 使用json需要引用到System.Web.Script.Serialization.习惯在解决方案右键 ...
- Matplotlib数据可视化(3):文本与轴
在一幅图表中,文本.坐标轴和图像的是信息传递的核心,对着三者的设置是作图这最为关心的内容,在上一篇博客中虽然列举了一些设置方法,但没有进行深入介绍,本文以围绕如何对文本和坐标轴进行设置展开(对图像 ...
- 【视频+图文】带你快速掌握带continue语句的双重for循环
双重for循环掌握后,我们就一起来看看双重for循环的进阶内容一之带continue语句的双重for循环. 上期双重for循环[视频+图文]讲解传输门:点击这里可去小乔的哔哩哔哩观看for循环视频~ ...
- Reids(4)——神奇的HyperLoglog解决统计问题
一.HyperLogLog 简介 HyperLogLog 是最早由 Flajolet 及其同事在 2007 年提出的一种 估算基数的近似最优算法.但跟原版论文不同的是,好像很多书包括 Redis 作者 ...
- Python3——2019年全国大学生计算二级考试
Python语言程序设计二级重点(2019年版) 第一章 程序设计基本方法 IPO程序编写方法 :输入(input),输出(output),处理(process): Python程序的特点: (1)语 ...
- 前端每日实战:27# 视频演示如何用纯 CSS 创作一个精彩的彩虹 loading 特效
效果预览 按下右侧的"点击预览"按钮可以在当前页面预览,点击链接可以全屏预览. https://codepen.io/comehope/pen/vjvoow 可交互视频教程 此视频 ...
- Await/Async
Async其实就是Generator函数的语法糖. 啥是语法糖?就是一种更容易让人理解,代码可读性更高的另外一种语法. const asyncRead = async function(){ cons ...
- 超详细,多图文使用galera cluster搭建mysql集群并介绍wsrep相关参数
超详细,多图文使用galera cluster搭建mysql集群并介绍wsrep相关参数 介绍galera cluster原理的文章已经有一大堆了,百度几篇看一看就能有相关了解,这里就不赘述了.本文主 ...