Submit Search
Upload
Lock attachfilewhileparentrecordlocked
•
Download as PPTX, PDF
•
0 likes
•
408 views
furuCRM株式会社 CEO/Dreamforce Vietnam Founder
Follow
親レコード承認申請中添付ファイルロック不可への対策案
Read less
Read more
Technology
Report
Share
Report
Share
1 of 9
Download now
Recommended
Overview of web services
Overview of web services
People Strategists
20120612 05 - Etude de maturité d'une organisation de tests avec TPI Next
20120612 05 - Etude de maturité d'une organisation de tests avec TPI Next
LeClubQualiteLogicielle
Relational data base management system (Unit 1)
Relational data base management system (Unit 1)
Ismail Mukiibi
Business Intelligence (May – 2019) [Choice Based | Question Paper]
Business Intelligence (May – 2019) [Choice Based | Question Paper]
Mumbai B.Sc.IT Study
أشهر شهادات اختبار البرمجيات التي يُمكنك الحصول عليها
أشهر شهادات اختبار البرمجيات التي يُمكنك الحصول عليها
TestCrew
Load runner & win runner
Load runner & win runner
Himanshu
Software project management Software economics
Software project management Software economics
REHMAT ULLAH
Main principles of Data Science and Machine Learning
Main principles of Data Science and Machine Learning
Nikolay Karelin
Recommended
Overview of web services
Overview of web services
People Strategists
20120612 05 - Etude de maturité d'une organisation de tests avec TPI Next
20120612 05 - Etude de maturité d'une organisation de tests avec TPI Next
LeClubQualiteLogicielle
Relational data base management system (Unit 1)
Relational data base management system (Unit 1)
Ismail Mukiibi
Business Intelligence (May – 2019) [Choice Based | Question Paper]
Business Intelligence (May – 2019) [Choice Based | Question Paper]
Mumbai B.Sc.IT Study
أشهر شهادات اختبار البرمجيات التي يُمكنك الحصول عليها
أشهر شهادات اختبار البرمجيات التي يُمكنك الحصول عليها
TestCrew
Load runner & win runner
Load runner & win runner
Himanshu
Software project management Software economics
Software project management Software economics
REHMAT ULLAH
Main principles of Data Science and Machine Learning
Main principles of Data Science and Machine Learning
Nikolay Karelin
Software Re-Engineering in Software Engineering SE28
Software Re-Engineering in Software Engineering SE28
koolkampus
Term weighting
Term weighting
Primya Tamil
Quality Management in Software Engineering SE24
Quality Management in Software Engineering SE24
koolkampus
physical and logical data independence
physical and logical data independence
apoorva_upadhyay
Compiler construction tools
Compiler construction tools
Akhil Kaushik
Requirements Engineering Processes in Software Engineering SE6
Requirements Engineering Processes in Software Engineering SE6
koolkampus
MODULE 1_Introduction to Data analytics and life cycle..pptx
MODULE 1_Introduction to Data analytics and life cycle..pptx
nikshaikh786
Database management system by Neeraj Bhandari ( Surkhet.Nepal )
Database management system by Neeraj Bhandari ( Surkhet.Nepal )
Neeraj Bhandari
Data Exploration and Visualization with R
Data Exploration and Visualization with R
Yanchang Zhao
Software Engineering Important Short Question for Exams
Software Engineering Important Short Question for Exams
MuhammadTalha436
Software assessment and audit
Software assessment and audit
Spoorthi Sham
Capability maturity model
Capability maturity model
Faizan Anwar
Project Planning in Software Engineering
Project Planning in Software Engineering
Fáber D. Giraldo
Software Quality Assurance
Software Quality Assurance
Siddhesh Palkar
Software Quality Challenge
Software Quality Challenge
Helmy Satria
Chapter 15 software product metrics
Chapter 15 software product metrics
SHREEHARI WADAWADAGI
POST’s CORRESPONDENCE PROBLEM
POST’s CORRESPONDENCE PROBLEM
Rajendran
Non- Recursive Predictive Parsing.pptx
Non- Recursive Predictive Parsing.pptx
sampathkumar912515
Random testing
Random testing
Locaweb
Chapter 13 software testing strategies
Chapter 13 software testing strategies
SHREEHARI WADAWADAGI
GithubAction+DevOpsCenter.pptx
GithubAction+DevOpsCenter.pptx
furuCRM株式会社 CEO/Dreamforce Vietnam Founder
BackupMetadataByGitAction.pptx
BackupMetadataByGitAction.pptx
furuCRM株式会社 CEO/Dreamforce Vietnam Founder
More Related Content
What's hot
Software Re-Engineering in Software Engineering SE28
Software Re-Engineering in Software Engineering SE28
koolkampus
Term weighting
Term weighting
Primya Tamil
Quality Management in Software Engineering SE24
Quality Management in Software Engineering SE24
koolkampus
physical and logical data independence
physical and logical data independence
apoorva_upadhyay
Compiler construction tools
Compiler construction tools
Akhil Kaushik
Requirements Engineering Processes in Software Engineering SE6
Requirements Engineering Processes in Software Engineering SE6
koolkampus
MODULE 1_Introduction to Data analytics and life cycle..pptx
MODULE 1_Introduction to Data analytics and life cycle..pptx
nikshaikh786
Database management system by Neeraj Bhandari ( Surkhet.Nepal )
Database management system by Neeraj Bhandari ( Surkhet.Nepal )
Neeraj Bhandari
Data Exploration and Visualization with R
Data Exploration and Visualization with R
Yanchang Zhao
Software Engineering Important Short Question for Exams
Software Engineering Important Short Question for Exams
MuhammadTalha436
Software assessment and audit
Software assessment and audit
Spoorthi Sham
Capability maturity model
Capability maturity model
Faizan Anwar
Project Planning in Software Engineering
Project Planning in Software Engineering
Fáber D. Giraldo
Software Quality Assurance
Software Quality Assurance
Siddhesh Palkar
Software Quality Challenge
Software Quality Challenge
Helmy Satria
Chapter 15 software product metrics
Chapter 15 software product metrics
SHREEHARI WADAWADAGI
POST’s CORRESPONDENCE PROBLEM
POST’s CORRESPONDENCE PROBLEM
Rajendran
Non- Recursive Predictive Parsing.pptx
Non- Recursive Predictive Parsing.pptx
sampathkumar912515
Random testing
Random testing
Locaweb
Chapter 13 software testing strategies
Chapter 13 software testing strategies
SHREEHARI WADAWADAGI
What's hot
(20)
Software Re-Engineering in Software Engineering SE28
Software Re-Engineering in Software Engineering SE28
Term weighting
Term weighting
Quality Management in Software Engineering SE24
Quality Management in Software Engineering SE24
physical and logical data independence
physical and logical data independence
Compiler construction tools
Compiler construction tools
Requirements Engineering Processes in Software Engineering SE6
Requirements Engineering Processes in Software Engineering SE6
MODULE 1_Introduction to Data analytics and life cycle..pptx
MODULE 1_Introduction to Data analytics and life cycle..pptx
Database management system by Neeraj Bhandari ( Surkhet.Nepal )
Database management system by Neeraj Bhandari ( Surkhet.Nepal )
Data Exploration and Visualization with R
Data Exploration and Visualization with R
Software Engineering Important Short Question for Exams
Software Engineering Important Short Question for Exams
Software assessment and audit
Software assessment and audit
Capability maturity model
Capability maturity model
Project Planning in Software Engineering
Project Planning in Software Engineering
Software Quality Assurance
Software Quality Assurance
Software Quality Challenge
Software Quality Challenge
Chapter 15 software product metrics
Chapter 15 software product metrics
POST’s CORRESPONDENCE PROBLEM
POST’s CORRESPONDENCE PROBLEM
Non- Recursive Predictive Parsing.pptx
Non- Recursive Predictive Parsing.pptx
Random testing
Random testing
Chapter 13 software testing strategies
Chapter 13 software testing strategies
More from furuCRM株式会社 CEO/Dreamforce Vietnam Founder
GithubAction+DevOpsCenter.pptx
GithubAction+DevOpsCenter.pptx
furuCRM株式会社 CEO/Dreamforce Vietnam Founder
BackupMetadataByGitAction.pptx
BackupMetadataByGitAction.pptx
furuCRM株式会社 CEO/Dreamforce Vietnam Founder
Salesforce Flow_InternalTraining.pptx
Salesforce Flow_InternalTraining.pptx
furuCRM株式会社 CEO/Dreamforce Vietnam Founder
FlowErrorHandling.pptx
FlowErrorHandling.pptx
furuCRM株式会社 CEO/Dreamforce Vietnam Founder
DevOpsCenter_BetaVersion.pptx
DevOpsCenter_BetaVersion.pptx
furuCRM株式会社 CEO/Dreamforce Vietnam Founder
Omni-Chanel_ForInternal.pptx
Omni-Chanel_ForInternal.pptx
furuCRM株式会社 CEO/Dreamforce Vietnam Founder
基本設計+詳細設計の書き方 社内勉強会0304
基本設計+詳細設計の書き方 社内勉強会0304
furuCRM株式会社 CEO/Dreamforce Vietnam Founder
SVF cloud for salesforce
SVF cloud for salesforce
furuCRM株式会社 CEO/Dreamforce Vietnam Founder
External services
External services
furuCRM株式会社 CEO/Dreamforce Vietnam Founder
Data spider servista for Beginner
Data spider servista for Beginner
furuCRM株式会社 CEO/Dreamforce Vietnam Founder
Record level-access in Salesforce
Record level-access in Salesforce
furuCRM株式会社 CEO/Dreamforce Vietnam Founder
Salesforce CMS
Salesforce CMS
furuCRM株式会社 CEO/Dreamforce Vietnam Founder
Salesforce Scheduler
Salesforce Scheduler
furuCRM株式会社 CEO/Dreamforce Vietnam Founder
Pardot MA Fundamental
Pardot MA Fundamental
furuCRM株式会社 CEO/Dreamforce Vietnam Founder
Field service lightning
Field service lightning
furuCRM株式会社 CEO/Dreamforce Vietnam Founder
ETL And Salesforce Integration
ETL And Salesforce Integration
furuCRM株式会社 CEO/Dreamforce Vietnam Founder
Sfdx jenkins
Sfdx jenkins
furuCRM株式会社 CEO/Dreamforce Vietnam Founder
Heroku platform introduction
Heroku platform introduction
furuCRM株式会社 CEO/Dreamforce Vietnam Founder
Unlocked package
Unlocked package
furuCRM株式会社 CEO/Dreamforce Vietnam Founder
Asynchronous apex
Asynchronous apex
furuCRM株式会社 CEO/Dreamforce Vietnam Founder
More from furuCRM株式会社 CEO/Dreamforce Vietnam Founder
(20)
GithubAction+DevOpsCenter.pptx
GithubAction+DevOpsCenter.pptx
BackupMetadataByGitAction.pptx
BackupMetadataByGitAction.pptx
Salesforce Flow_InternalTraining.pptx
Salesforce Flow_InternalTraining.pptx
FlowErrorHandling.pptx
FlowErrorHandling.pptx
DevOpsCenter_BetaVersion.pptx
DevOpsCenter_BetaVersion.pptx
Omni-Chanel_ForInternal.pptx
Omni-Chanel_ForInternal.pptx
基本設計+詳細設計の書き方 社内勉強会0304
基本設計+詳細設計の書き方 社内勉強会0304
SVF cloud for salesforce
SVF cloud for salesforce
External services
External services
Data spider servista for Beginner
Data spider servista for Beginner
Record level-access in Salesforce
Record level-access in Salesforce
Salesforce CMS
Salesforce CMS
Salesforce Scheduler
Salesforce Scheduler
Pardot MA Fundamental
Pardot MA Fundamental
Field service lightning
Field service lightning
ETL And Salesforce Integration
ETL And Salesforce Integration
Sfdx jenkins
Sfdx jenkins
Heroku platform introduction
Heroku platform introduction
Unlocked package
Unlocked package
Asynchronous apex
Asynchronous apex
Recently uploaded
自分史上一番早い2024振り返り〜コロナ後、仕事は通常ペースに戻ったか〜 by IoT fullstack engineer
自分史上一番早い2024振り返り〜コロナ後、仕事は通常ペースに戻ったか〜 by IoT fullstack engineer
Yuki Kikuchi
SOPを理解する 2024/04/19 の勉強会で発表されたものです
SOPを理解する 2024/04/19 の勉強会で発表されたものです
iPride Co., Ltd.
TataPixel: 畳の異方性を利用した切り替え可能なディスプレイの提案
TataPixel: 畳の異方性を利用した切り替え可能なディスプレイの提案
sugiuralab
デジタル・フォレンジックの最新動向(2024年4月27日情洛会総会特別講演スライド)
デジタル・フォレンジックの最新動向(2024年4月27日情洛会総会特別講演スライド)
UEHARA, Tetsutaro
モーダル間の変換後の一致性とジャンル表を用いた解釈可能性の考察 ~Text-to-MusicとText-To-ImageかつImage-to-Music...
モーダル間の変換後の一致性とジャンル表を用いた解釈可能性の考察 ~Text-to-MusicとText-To-ImageかつImage-to-Music...
博三 太田
AWS の OpenShift サービス (ROSA) を使った OpenShift Virtualizationの始め方.pdf
AWS の OpenShift サービス (ROSA) を使った OpenShift Virtualizationの始め方.pdf
FumieNakayama
【早稲田AI研究会 講義資料】3DスキャンとTextTo3Dのツールを知ろう!(Vol.1)
【早稲田AI研究会 講義資料】3DスキャンとTextTo3Dのツールを知ろう!(Vol.1)
Hiroki Ichikura
クラウドネイティブなサーバー仮想化基盤 - OpenShift Virtualization.pdf
クラウドネイティブなサーバー仮想化基盤 - OpenShift Virtualization.pdf
FumieNakayama
CTO, VPoE, テックリードなどリーダーポジションに登用したくなるのはどんな人材か?
CTO, VPoE, テックリードなどリーダーポジションに登用したくなるのはどんな人材か?
akihisamiyanaga1
Recently uploaded
(9)
自分史上一番早い2024振り返り〜コロナ後、仕事は通常ペースに戻ったか〜 by IoT fullstack engineer
自分史上一番早い2024振り返り〜コロナ後、仕事は通常ペースに戻ったか〜 by IoT fullstack engineer
SOPを理解する 2024/04/19 の勉強会で発表されたものです
SOPを理解する 2024/04/19 の勉強会で発表されたものです
TataPixel: 畳の異方性を利用した切り替え可能なディスプレイの提案
TataPixel: 畳の異方性を利用した切り替え可能なディスプレイの提案
デジタル・フォレンジックの最新動向(2024年4月27日情洛会総会特別講演スライド)
デジタル・フォレンジックの最新動向(2024年4月27日情洛会総会特別講演スライド)
モーダル間の変換後の一致性とジャンル表を用いた解釈可能性の考察 ~Text-to-MusicとText-To-ImageかつImage-to-Music...
モーダル間の変換後の一致性とジャンル表を用いた解釈可能性の考察 ~Text-to-MusicとText-To-ImageかつImage-to-Music...
AWS の OpenShift サービス (ROSA) を使った OpenShift Virtualizationの始め方.pdf
AWS の OpenShift サービス (ROSA) を使った OpenShift Virtualizationの始め方.pdf
【早稲田AI研究会 講義資料】3DスキャンとTextTo3Dのツールを知ろう!(Vol.1)
【早稲田AI研究会 講義資料】3DスキャンとTextTo3Dのツールを知ろう!(Vol.1)
クラウドネイティブなサーバー仮想化基盤 - OpenShift Virtualization.pdf
クラウドネイティブなサーバー仮想化基盤 - OpenShift Virtualization.pdf
CTO, VPoE, テックリードなどリーダーポジションに登用したくなるのはどんな人材か?
CTO, VPoE, テックリードなどリーダーポジションに登用したくなるのはどんな人材か?
Lock attachfilewhileparentrecordlocked
1.
z 親レコード承認申請中 添付ファイルロック不可 への対策案 Created By: Kagawa
Hoang Created Date: 2020/08/30
2.
z Agenda 1. 承認プロセスのロック仕組みについて 2. 承認申請中ファイルロック不可の課題 3.
承認申請中ファイルロック不可への対策案 4. ソースコード
3.
z 1. 承認プロセスのロック仕組みについて 格納先 ContentDocument:ファイ ル中身を格納 ContentDocumentLink: ファイルの共有先を格納 子オブジェ クト 親 承認申請 子オブジェ クト ファイル オブジェク ト 主従関係 参照関係
参照関係 一般的に申請確定、回付中、 承認済み申請承認対象レ コードをロックとする
4.
z 2. 承認申請中ファイルロック不可の課題 格納先 ContentDocument:ファイ ル中身を格納 ContentDocumentLink: ファイルの共有先を格納 子オブジェ クト 親 承認申請 子オブジェ クト ファイル オブジェク ト 主従関係 参照関係
参照関係 ①申請承認レコードをロック際に勝手に主従関係子 レコードも親のロック状態を継承される ②参照関係子レコード又は添付ファイル(参照関 係)が親のロック状態を継承しません。(=>Unlock)
5.
z 3. 承認申請中ファイルロック不可への対策案 「添付ファイルの関連リスト」に て「ファイルをアップロード」を防 ぐ 「添付ファイルのレコードアクション」関連リストにて「新しいバージョンをアップロード」、「ファイルの詳 細を編集」、「削除」、「レコードから削除」を防ぐ
6.
z 3. 承認申請中ファイルロック不可への対策案 No 防ぐ対象アクション
対策 1 ファイルをアップロード ContentDocumentのBeforeUpdateトリガーにて親レコードの ロック状態により新規ファイルの添付を防ぐ 2 新しいバージョンをアップロード ContentDocumentのBeforeUpdateトリガーにて親レコードの ロック状態によりファイルの書き換えを防ぐ 3 ファイルの詳細を編集 ContentDocumentLinkのBeforeUpdateトリガーにて親レコード のロック状態により添付ファイルの詳細情報更新を防ぐ 4 削除 ContentDocumentのBeforeDeleteトリガーにて親レコードの ロック状態により添付ファイルの削除を防ぐ 5 レコードから削除 ContentDocumentLinkのBeforeDeleteトリガーにて親レコード のロック状態によりレコードから添付ファイルの削除を防ぐ
7.
z 4. ソースコード //セールスフォースのベストプラクティスによりトリガーハンドラーを書いてね! trigger ContentDocumentTrigger
on ContentDocument (before update,before delete) { if(Trigger.isUpdate ){ for(ContentDocumentLink link:[SELECT Id,ContentDocument.title,ContentDocumentId,ShareType, LinkedEntity.Name FROM ContentDocumentLink where ContentDocumentId=: Trigger.newMap.keySet()]){ if(Approval.isLocked(link.LinkedEntityId)){ System.debug(‘新規ファイルの添付又はファイルの書き換え又はファイル削除がダメ’); trigger.newMap.get(link.ContentDocumentId).addError(‘新規ファイルの添付又はファイルの書 き換え又はファイル削除がダメ''); } } } if(Trigger.isDelete){ for(ContentDocumentLink link:[SELECT Id,ContentDocument.title,ContentDocumentId,ShareType, LinkedEntity.Name FROM ContentDocumentLink where ContentDocumentId=: Trigger.oldMap.keySet()]){ if(Approval.isLocked(link.LinkedEntityId)){ System.debug(‘添付ファイルの削除がダメ'); trigger.oldMap.get(link.ContentDocumentId).addError('添付ファイルの削除がダメ'); } } } }
8.
z 4. ソースコード //セールスフォースのベストプラクティスによりトリガーハンドラーを書いてね! trigger ContentDocumentLinkTrigger
on ContentDocumentLink (before update, before delete) { if(Trigger.isUpdate ){ for(ContentDocumentLink rNew : trigger.new) { if(Approval.isLocked(rNew.LinkedEntityId)){ System.debug(‘添付ファイルの詳細情報更新がダメ'); rNew.addError('添付ファイルの詳細情報更新がダメ'); } } } if(Trigger.isDelete ){ for(ContentDocumentLink rOld : trigger.old) { if(Approval.isLocked(rOld.LinkedEntityId)){ System.debug(‘レコードから添付ファイルの削除がダメ'); rOld.addError('レコードから添付ファイルの削除がダメ'); } } } }
9.
z 4. おしまい Happy Coding!
Download now