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. 关于RN的热更新

    写点关于RN的热更新和RN版本升级后的强制更新.以及优化白屏问题 在APPDelegate中加载RN,一般的加载方式是:RCTRootView *rootView= [[RCTRootView all ...

  2. C++走向远洋——29(长方柱类)

    */ * Copyright (c) 2016,烟台大学计算机与控制工程学院 * All rights reserved. * 文件名:长方柱类.cpp * 作者:常轩 * 微信公众号:Worldhe ...

  3. android通过NFC开启/关闭NTAG213的密码保护功能

    穷遍全网没有资料,最后找到了官方的寄存器文档和StackOverflow上找到了解决方案 首先要用 MifareUltralight 来进行操作,在onNewIntent处先校验返回的tag是否包含了 ...

  4. Nginx之反向代理配置(一)

    前文我们聊了下Nginx作为web服务器配置https.日志模块的常用配置.rewrite模块重写用户请求的url,回顾请参考https://www.cnblogs.com/qiuhom-1874/p ...

  5. JDK 1.8 新特性之Date-Time API

    来源:请点击查看 1.8之前的日期类: 线程不安全:java.util.Date 这个类线程不安全,而且所有日期类都是可变的. 时间处理麻烦:默认的开始日期从1900年,不支持国际化,不提供时区支持, ...

  6. jdbc对 数据库的数据进行增删改(两个类)

    1.方法类 package com.com; import java.sql.Connection;import java.sql.DriverManager;import java.sql.Resu ...

  7. Object-Oriented Programming Summary Ⅱ

    电梯作业总结博客 17373492 电梯,多线程学习中的 "HelloWorld",早在大一就有所耳闻,以至于在坐电梯的时候就思考过:电梯需要怎么写呢? 0. 前言: 偶然的机会, ...

  8. Await/Async

    Async其实就是Generator函数的语法糖. 啥是语法糖?就是一种更容易让人理解,代码可读性更高的另外一种语法. const asyncRead = async function(){ cons ...

  9. 微博立场检测 60分Baseline

    AI研习社最近举办了一个比赛--微博立场检测,实际上就是一个NLP文本分类的比赛 Baseline-FastText 我的Baseline方法用的是pkuseg分词+FastText,最好成绩是60, ...

  10. Struts UI标签的使用

    先来看一下日期控件 html5标签中其实已经有日期的类型,用<input type="date">便可调用. struts里面也自带了日期控件,其使用步骤为: 1. 导 ...