自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(27)
  • 收藏
  • 关注

原创 Salesforce Integretion

Callout方法在执行后续代码的时候,会等待外部服务器的响应结果,所以Callout方法同样可以在@future(callout=true) 中进行调用,这样Callout方法可以在单独的进程中调用,不会阻塞其他进程,尤其在触发器中调用Callout方法时,必须将其包含在含有@future(callout=true) 的方法中进行。(2)304:用户在发送请求的header中指定日期时间,如果从这个日期时间开始请求的文件内容未变化,则返回该状态码。(10)415:服务器无法处理请求附带的媒体格式。

2024-05-22 20:51:49 559

原创 Salesforce Queueable Future Batch Schedulable

Future :future 异步方法参数只能是标准类型,不能有返回值, 同时在trigger 中调用 callout 必须为true,复杂处理尽量使用Queueable,同时多个Future 执行顺序不一定,需要按顺序使用Queueable。如果执行一次batch处理1000条数据,batch size是200,那么跑5次execute方法,也就是5个事务,每个事务中处理200条数据。如果第一个事务成功,第二个事务失败,那么第一个事务中对数据的更新不会回滚。Queueable 可以串联5个进行执行。

2024-05-20 19:05:58 169

原创 代码共享以及删除

/* * Created by leal on 2020/12/17. */public class ForecastShareCommunity implements Triggers.Handler{ public void handle() { List<Forecast__c> newForecastList = (List<Forecast__c>) Trigger.new; Map<Id, List<Forecast__c>> a.

2021-01-18 15:12:16 207

原创 Batch 调用 定时执行

定时执行 batchglobal class LogistiInfoSchedu implements Schedulable, Database.Batchable<sObject>, Database.Stateful, Database.AllowsCallouts { public Set<Id> updateOiIdSet; global void execute(SchedulableContext sc) { LogistiIn.

2021-01-18 15:03:46 509

原创 Trigger 判断字段是否修改了

Map<Id, User> newUserMap = (Map<Id, User>)Trigger.newMap;Map<Id, User> oldUserMap = (Map<Id, User>)Trigger.oldMap;Set <Id> userIdSet = new Set <Id>();for (Id id : newUserMap.keySet()) { if (newUserMap.get(id).Man.

2020-12-03 15:34:13 273

原创 Wechat 发送回复消息

public static void sendRegisterMessage(String toWho, String title, String description, String campaignId) { Http h = new Http(); HttpRequest req = new HttpRequest(); req.setMethod('POST'); req.setHeader('Accept-Encoding', 'gzip,deflate');.

2020-11-10 11:40:31 332

原创 Apex 发送系统提示

MyBellNotification.notifyCurrentUser('Your orders had been confirmed!');public class MyBellNotification{ public static void notifyCurrentUser(String message) { Http h = new Http(); HttpRequest req = new HttpRequest(); .

2020-11-10 11:34:55 360

原创 Aura Lookup

cmp<aura:component controller="LookupComponentController"> <aura:attribute Name="selItem" type="object" access="public" description="This attribute can be used by parent component to read selected record" /> <aura:attribute Name=.

2020-11-10 11:28:43 162 1

原创 Aura catch 异常信息

try { insert activityList;} catch (DmlException ex) { AuraUtilities.throwAuraHandledException(ex.getTypeName(), ex.getMessage());}global with sharing class AuraUtilities { /* * @description throwing a custom exception that showing th.

2020-11-10 11:18:14 375

原创 apex 拼接sql

@AuraEnabledpublic static List<Object> fetchDataByListviewName(String listviewId, String searchTerm, String area, .

2020-11-10 11:13:25 206

原创 获取选中信息 以及通过 page 传递信息 到 aura

cmp<aura:component implements="lightning:actionOverride,flexipage:availableforallpagetypes,force:apphostable,force:lightningQuickAction,lightning:isUrlAddressable,force:hasRecordId" access="global" controller="NewCustomerVisitPlanCont

2020-11-10 11:11:45 217

原创 salesforce 导出Excel 文件

Page:<apex:page standardController="Quote" extensions="QuoteExportController" contentType="txt/xml#{!quote.Name}.xls" cache="true" id="quoteId" showheader="false"> <html xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1

2020-11-10 10:38:48 1430

原创 Aura datatable 行内编辑

cmp<aura:component implements="flexipage:availableforallpagetypes,force:apphostable,force:hasRecordId,lightning:isUrlAddressable,force:hasRecordId,force:lightningquickactionwithoutheader"access="global" controller="WeeklyReportApprovalController".

2020-09-07 14:52:35 249

原创 lwc inline edit

<template> <lightning-card variant="Weekly Report Item" title="Weekly Report Item" icon-name="standard:event"> <lightning-datatable key-field="id" hide-checkbox-column .

2020-09-01 14:03:23 174

原创 salesforce clone

global with sharing class QuoteCloneController { webservice static String cloneQuote(ID oId, boolean withChildren) { Quote quote=(Quote)queryForRecords(Quote.getSObjectType(),oId); List<QuoteLineItem> quoteLineItemList=(List<QuoteLineItem&.

2020-08-05 16:54:46 345

原创 Salesforce wechat

public with sharing class WechatNews { public WechatNews() { } public String title; public String description; public String picUrl; public String url; public WeChatNews(String t, String d, String p, String u){ this...

2020-07-28 15:43:47 411

原创 Salesforce Map 优化List

//查出当前quote 对应的 业务机会Map List<Opportunity> opportunityList = [SELECT Id, Unit__c FROM Opportunity WHERE Unit__c!=null AND Id in :oppIdSet]; Map<Id, Opportunity> opportunityMap = new Map<Id, Opportunity>(); for (Opportunity opp : ...

2020-07-28 15:30:23 472 1

原创 Salesforce 邮件服务

功能 根据邮件回复内容进行审批或者字段更新等新建Email Service (配置允许的邮件地址等,新建Email Addresses) 并且编写后台Apexglobal class ******EmailService implements Messaging.InboundEmailHandler{ global Messaging.InboundEmailResult handleInboundEmail(Messaging.InboundEmail email, .

2020-07-28 15:26:03 1156 1

原创 LINUX操作系统配置

创建用户建工作组xxxx#groupadd xxxx添加用户#adduser -g xxxx xxxx修改用户密码#passwd xxxx输入2次密码查看用户属性#id xxxx安全整改要求,将用户加入wheel组,即允许su到root用户#usermod -G wheel xxxx修改主机名和HOSTS文件主机名字不要为localhosts编辑/etc/sysconfig/network 文件,给主机启用一个全网唯一的名字vi /etc/sysc..

2020-07-24 16:27:12 664

原创 Salesforce custom setting

可以用来存储一些每段时间都需要进行维护的数值查询方法和 查询对象类似Account_Segmentation_Threshold__c AccountSegmentationThreshold = [ select Follower_Threshold__c, Innovator_Threshold__c, Leader_Threshold__c, Survivor_Threshold__c from Account_Segmentation_Threshold__c ];

2020-07-24 16:06:53 176

原创 Salesforce Scheduler Batch

环境设置对应的job 执行时间global class UpdateAccountSegmentationScheduler implements Schedulable{ global void execute(SchedulableContext sc) { Integer month=Date.today().month(); UpdateAccountSegmentationBatch batch = new UpdateAccountSegmentationBatch();

2020-07-24 16:01:11 208

原创 Salesforce 获取标准页面用户选中的记录

在对应的页面新建对应的Button或者Action使用Visualforce 进行获取<apex:page standardController="Account" recordSetVar="accounts" extensions="CustomerVisitPlanListViewController" action="{!redirect}"> <script> window.onload = setupPage;

2020-07-24 15:52:54 329

原创 Salesforce 获取某个对象的某个字段的picklist值

封装成一个方法重用public with sharing class CommonUtilities { @AuraEnabled public static List<String> getPicklist(String objName, String fieldName) { List<String> lstPicklist = new List<String>(); Schema.SObjectType targetType = Schema.g

2020-07-24 15:41:09 598

原创 Salesforce Aura 组件

Trialhead :https://trailhead.salesforce.com/en/content/learn/modules/lex_dev_lc_basicshttps://developer.salesforce.com/docs/component-library/documentation/lwchttps://www.lightningdesignsystem.com/icons/系统使用Aura 组件需要domain使用组件调用后台apex方法组件例子.

2020-07-24 15:37:37 1377

原创 Salesforce Trigger

每个trigger 最好都 使用一个类来进行管理TriggerManagerpublic class TriggerManager { public enum Event { AFTER_DELETE, AFTER_INSERT, AFTER_UNDELETE, AFTER_UPDATE, BEFORE_DELETE, BEFORE_INSERT, BEFORE_UPDATE } public interface Handler { void handle(); }.

2020-07-24 15:18:13 184

原创 网管常用查询命令

网管常用命令ip自己修改telnet查询OLT数量退出方式:ctrl加右大括号,然后q告警订阅命令:SUBSCRIBE:::CTAG::;查询网管下面的所有网元LOGIN:::CTAG::UN=****,PWD=****;--登录指令LOGIN:::CTAG::UN=*****,PWD=*****;--登录指令LST-LANPORT::OLTID=172.26.79.8:CTAG::;LST-DEVICE:::CTAG::;--查询所有OLT信息LST-SHELF::OLTI

2020-07-24 14:26:16 911

原创 服务器基础信息命令

服务器基础信息1,查看linux服务器的型号: dmidecode |grep "Name"2,查看linux服务器的系统版本 cat /etc/issue cat /etc/issue //查看linux的版本信息 lsb_release -a //查看LSB本身的版本信息 uname -r //Kernel版本3,查看linux服务器的CPU及内存使用率topps -aux | more PS命令显示的不太直观,是查看后台进程的好命令,选项中的%cpu ...

2020-07-24 11:56:53 190

空空如也

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除