<!-- use lightning:utilityBarAPI -->
Search In This Blog
2022-11-30
Custom auto open utility bar without popout button by aura
<!-- use lightning:utilityBarAPI -->
Get recordId in LWC
2022-11-29
Delete by record id use Schema SObjectType
public without sharing class CustomDeleteCmpController {
@AuraEnabled(cacheable=true)
public static String init(Id recordId) {
// object name
return recordId.getSobjectType().getDescribe().getLabel();
}
@AuraEnabled
public static String doDelete(Id recordId) {
try {
String objApiName;
RecordDelete.deleteLists(new List<SObject>{recordId.getSobjectType().newSObject(recordId)});
if (String.isNotBlank(recordId)) {
objApiName = String.valueOf(recordId.getSObjectType());
}
return objApiName;
} catch (Exception ex) {
throw ex;
}
}
}
Use 3rd Party Resource in LWC
2022-11-01
ReGet data without reload page
Reget data and raletive list data, but not reload page or redirect url.
In AURA
$A.get('e.force:refreshView').fire();
In LWC
import { getRecordNotifyChange } from 'lightning/uiRecordApi';
getRecordNotifyChange([{recordId: this.recordId1},{recordId: this.recordId2}]);
or
eval("$A.get('e.force:refreshView').fire();");
},1000)
オブジェクト項目レベルセキュリティの一括管理
ツールなど経由して作成した項目はよく項目レベルセキュリティー権限をセットしていないです。
個別で項目レベルセキュリティーを設定するのは時間かかります。
一括管理の方法
1権限セット
2プロファイル:設定>プロファイル>項目レベルセキュリティ