salesforce report get url parameters
Passing report filters as query params to Salesforce reports ! Today, I stumbled across an interesting problem, where one needs to “Run a report by passing parameters through link or button click” Their is no direct way visible in report configuration screen for the same. So I scanned salesforce developer boards for the same, and found this solution that worked perfectly for me, thanks “mikef” for sharing this solution(can’t find your twitter profile ). Using the same ...
salesforce display trigger error
trigger test on Account(before insert){ trigger.new[0].name.addError('Nice try'); }
salesforce发送email
首先,我们要设置一下,否则你是无论怎么怼,你都收不到任何邮件: Have a look under Setup > Email Administration > Deliverability. Newly created sandboxes have the default email deliverability set to "System email only." The options are: No access: Prevents all outbound email to and from users. System email only: Allows only automatically generated emails, such as new user and password reset emails. All email: Allows all types of outbound email. Default for new, non-sa...
salesforce Metadata Types
Metadata Type Allows Wildcard (*)? Description AccountSettings Not Applicable Represents an organization’s account settings for account teams, account owner report, and the View Hierarchy link. ActionLinkGroupTemplate Yes Represents the action link group template. Action link templates let you reuse action link definitions and package and distribute action links. An action link is a button on a feed element. Clicking on an action link can take a user to another We...
salesforce Schedule Jobs用法
salesforce Schedule Jobs用法 global class deleteANSMessageJob implements Schedulable { //Execute method global void execute (SchedulableContext SC) { DateTime recordDate = DateTime.now().date(); //recordDate = recordDate.addMonths(-2); List<ANS_Message_Repository__c> messages = [select Id from ANS_Message_Repository__c where LastModifiedDate <:recordDate ]; integer count = messages.size(); de...
salesforce Custom Settings简单使用
前言 Custom Settings创建类似于Custom Object,但是两者用法上有一些区别:Custom Setting可以通过条件配置来区分特定的用户,或者Profile。 所有Custom Settings数据都暴露在应用程序缓存中,这使得无需反复查询数据库的成本就能够高效访问。然后,这些数据可以在formula fields, validation rules, flows, Apex, and the SOAP API使用。 Custom Settings可以应用到很多场景,因为可以通过特定用户和Profile进行配置,所以设置白名单或者相反的功能很容易,除此之外还可以应用到其他场景,根据他的功能自行来使用...
salesforce开发利器:metaforce下载
谷歌app下载地址:https://chrome.google.com/webstore/detail/metaforce/hhnkaakhlhngcdckdiogpkjihnmgodep 本地下载:Metaforce 3.1.2.5_0 (本人从谷歌下载后,上传到了自己的博客供大家下载) 先看下效果图:
salesforce rest api test class
上一篇文章(salesforce rest api demo)我们写到salesforce如何写rest api,这篇我们将写如何写test class @isTest(SeeAllData=true) public class Api_user_profileTest { static testMethod void Api_user_profileTest() { system.debug('start...'); Test.startTest(); String ReturnCode = ''; RestContext.request = new RestRequest(); RestContext.response = new RestResponse(); RestContext.request.requestURI = '/services/apexrest/user/p...
salesforce rest api demo
// //api getPersonBasicInformation //by bruce he @RestResource(urlMapping='/user/profile/*') global with sharing class Api_user_profile{ @HttpGet global static void getPersonBasicInformation() { RestResponse res = RestContext.response; res.addHeader('Content-Type', 'application/json'); //return result obj PersonBasicInformation model = new PersonBasicInformation(); try{ ...
C#/.NET请求salesforce restful api示例
先在salesforce里写一个restful api: @RestResource(urlMapping='/user/*') global with sharing class Api_user_profile{ @HttpGet global static String getPersonBasicInformation() { List<Account> accList = DataBase.query('SELECT id,name FROM Account limit ' + Integer.valueOf(Math.floor(Math.random() * 10 + 1))); return JSON.serialize(accList); } } 再在c#/.net里调用salesforce restful api: using System; using System.Collec...