Salesforce技术
swonizuka
Salesforce dev
展开
-
[Salesforce] 关于Trigger 的使用(防止死循环)
因为帮同事做个EE, 考虑到的方法有两种, 第一是在接口上弄, 第二就是在trigger上做文章. 第一种方法风险比较大, 所以考虑第二种. 这种在trigger里面 insert or update 该 object 的做法. 之前还没试过, 所以想到的问题是 会不会插数据进去的时候, 触发trigger, 然后执行到insert 这句的sihou,又继续递归下去? 在SF群中, 众人有原创 2012-08-28 22:59:16 · 1221 阅读 · 0 评论 -
[Salesforce] Sorting of SelectOption list
As we know, the sorting method for SelectOption list is that sort the value first and then Label. Usually we need sort by label only or value. So here we have a workaround for this. Solution: We sho原创 2015-01-19 10:16:50 · 598 阅读 · 0 评论 -
[Salesforce] Solution of custom page cannot redirect on Salesforce1
We are now developing the customized page for both browser and Salesforce1, found that no matter how we are trying to use the command "sforce.one.navigateToSObject", the page still cannot be redirecte原创 2015-01-16 09:27:59 · 575 阅读 · 0 评论 -
[Salesforce] How to determine the login environment from Apex
Here is sample code to determine the login environment ( from Deskop browser or Salesforce1 ) Apex code: String userAgent = ApexPages.currentPage().getHeaders().get('User-Agent'); // sales原创 2015-01-07 08:47:30 · 492 阅读 · 0 评论 -
[Salesforce] 新版本的Salesforce如何重设安全标记
离开Salesforce2年了, Salesforce更新了很多, 哥的知识也都忘了差不多了. 现在重新pick up回这些, 真的需要一点勇气. 隐约记得旧的版本salesforce 是在重设密码旁 有重设安全标记的按钮的. 现在新版本改变了位置.原创 2014-12-09 09:23:05 · 850 阅读 · 1 评论 -
[Salesforce] Using the with sharing or without sharing Keywords
Use the with sharing or without sharing keywords on a class to specify whether or not to enforce sharing rules. The with sharing keyword allows you to specify that the sharing rules for the curre转载 2014-12-09 16:36:35 · 477 阅读 · 0 评论 -
[Salesforce] How to redirect to customize page through override button
Override the button with a new VisualPage and redirect to standard button action. Example codes: <apex:page StandardController="xxx__c" extensions="xxxxCtrl" action="{!URLFOR($Action.xxx原创 2015-01-07 08:55:19 · 431 阅读 · 0 评论 -
[Salesforce] Call REST from Apex
Here just shared the experiences for how to make a call to REST method from Apex side. Firstly, we should create a Class with REST annotation. An example REST class and in below @RestResource(ur原创 2015-01-07 08:33:06 · 586 阅读 · 0 评论 -
[Salesforce] JS onchange 事件 如何重复选同一个option
客户有个需求, 需要在选择框选择同样的选项的时候, 触发的事件依然有效. 按照正常的逻辑, onchange 事件是指按selectedIndex 改变的时候, 才会触发事件的. 那么按照这个逻辑, 理论上onchange 是不允许选择同样的option.原创 2014-12-15 09:22:53 · 971 阅读 · 0 评论 -
[Salesforce] customized Sorting by self defined field
Roughly coded a customized Sorting example for my colleague /* the class wants to be sorted. */ global Class commonClass implements Comparable { public Decimal HNPVI{get;set;} publ原创 2015-04-16 16:04:40 · 424 阅读 · 0 评论