1,:all of salesforce lightning component tags should in this tag.
2, aura:attribute:this tag is define a attribute and its children tag value of ‘name’ must unique.
3, aura:unescapedHtml:这个标签能够用来把传入的html的符号识别。如
….,可以用来和自定义标签使用,实现换行。
4,想要使得表单有滚动条:
<div style="overflow: auto; width: 100%;">
<table>…</table>
</div>
5,lightning 在写的时候,需要样式的时候,可以直接使用slds样式库的样式。使用方式,只需要在标签class=“需要的标签”,就可以。
<table class="slds-table slds-table_bordered slds-no-row-hover slds-table_cell-buffer"></table>
6, {!$Label.c.CustomerLabs }这个是用来获取自定义标签
7,<lightning:icon iconName=“utility:edit” size=“xx-small” />这个用来引用salesforce的标签库。其中iconName的值可以是action和utility两种类型
8,在页面上调至另一个页面:
function(component, event, helper) {
var evt = $A.get("e.force:navigateToComponent");
evt.setParams({
componentDef : "c:Mycomponent ",
componentAttributes: {
contactName : component.get("v.contact.Name")
}
});
evt.fire();
}
9,LastModifiedBy是一个查找字段。如果要获取名字,那么要使用LastModifiedBy.Name,不能使用LastModifiedById.Name
10,审批流里面,Action Valid values are: Approve, Reject, or Removed.
11,在SOQL里面等价NOT LIKE的语句
select Account__r.Id,Account__r.Name,Account__r.Account_Country__c from Card_UPC__c where Account__r.partner_relationship_status__c=‘Allow Relationships To Be Created’ and (NOT Account__r.Name like ‘Test%’).
12,$A.get(‘e.force:refreshView’).fire(); 页面刷新,用于局部刷新数据。可以使用在数据状态更改时,进行数据的刷新。不需要使用Windows.Location()
13. component.getReference('c.method '),用于在controller里面调用controller
14,在classic email 里面,如果是从excel里面copy出来,会带出样式。所以需要放到文本编辑器里面去样式。在邮件中可以直接使用 Object.Link。获取记录链接。然后可以在邮件模板里面点击连接,跳转到指定Record Page页面。
15,在apex里面获取custom label的方法: System.Label.名字
16.从一个component跳到另一个component 里面的方法:
var evt = $A.get("e.force:navigateToComponent");
evt.setParams({
componentDef : "c:组件名 ",
componentAttributes: {
参数名: value
},
});
evt.fire();
17,在component获取custom label的方法:
Label.c.label名字 ")
18,<lightning:input type="Number" html-autocomplete="off" name="SalesPerformanceTrenshold" aura:id="field2value" disabled="{!v.isPreview}" value="{!obj.Sales_Performance_Trenshold__c}" step="0.01" min="0.00"/>
在数字输入框里面,默认的递增是step = “1”.所以只能输入整形。可以调整step来进行递增的梯度值。
html-autocomplete=“off”, 这个能够关闭浏览器的缓存。但是对lightning:input不产生效果。目前没找到好的解决办法。只能使用去代替