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的更多相关文章

  1. 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 ...

  2. 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 ...

  3. 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 ...

  4. 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 ...

  5. 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 ...

  6. 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 ...

  7. 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. ...

  8. 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 ...

  9. 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 ...

随机推荐

  1. 一条SQL在内存结构与后台进程工作机制

    oracle服务器由数据库以及实例组成,数据库由数据文件,控制文件等物理文件组成,实例是由内存结构+后台进程组成,实例又可以看做连接数据库的方式,在我看来就好比一家公司,实例就是一个决策的办公室,大大 ...

  2. Go-数据类型以及变量,常量,函数,包的使用

    Go-数据类型以及变量,常量,函数,包的使用 一.数据类型 1.字符串类型 string -双引号包裹的:"xxx" -反引号包裹,可以换行, 注意: 区别于python,是没有单 ...

  3. 强大的java工作流引擎,可视化开发工作流

    我们先来看看什么是工作流? 所谓工作流引擎是指workflow作为应用系统的一部分,并为之提供对各应用系统有决定作用的根据角色.分工和条件的不同决定信息传递路由.内容等级等核心解决方案.工作流引擎包括 ...

  4. Swift --闭包表达式与闭包(汇编分析)

    在Swift中,可以通过func定义一个函数,也可以通过闭包表达式定义一个函数! 一.闭包表达式 概念 闭包表达式与定义函数的语法相对比,有区别如下: 去除了func 去除函数名 返回值类型添加了关键 ...

  5. 菜鸟系列Golang学习 — 切片

    切片简介 切片也是一种数据类型,在Golang中,切片底层基于数组实现的. 我们定义切片如下 var slice []int 切片之所以出现,是为了更好的利用资源,管理数据,如果使用数组,则我们一开始 ...

  6. 【Geek议题】合理的VueSPA架构讨论(上)

    前言 web前端发展到现代,已经不再是严格意义上的后端MVC的V层,它越来越向类似客户端开发的方向发展,已独立拥有了自己的MVVM设计模型.前后端的分离也使前端人员拥有更大的自由,可以独立设计客户端部 ...

  7. Tomcat8优化

    一.Tomcat8优化 Tomcat服务器在JavaEE项目中使用率非常高,所以在生产环境对Tomcat的优化也变得非常重要了. 对于Tomcat的优化,主要是从2个方面入手,一是,Tomcat自身的 ...

  8. asp.net mvc core 管道以及拦截器初了解

    今天来看一下asp.net core的执行管道.先看下官方说明: 从上图可以抛光,asp.net core的执行顺序是,当收到一个请求后,request请求会先经过已注册的中间件,然后会进入到mvc的 ...

  9. Idea - 常用基础配置

    前言 IntelliJ IDEA是我们开发常用的一大神器,深得众程序猿青睐,但是在使用过程中,有一些默认设置我们使用起来并不是很友好...这里就记录一些我使用的配置. 1.多行显示同时打开的多个文件 ...

  10. GPS信号模拟器信号发生器应用介绍

    GPS信号模拟器信号发生器应用介绍 随着近些年的科学技术不断发展,卫星导航技术也在日益发展和成熟,并在不同领域得到广泛的应用.尤其在导航定位接收机的研制测试阶段,就需要GPS信号模拟器来模拟不同环境和 ...