System.LimitException cannot catch by [try...catch...] in Apex.
When call Apex method in lwc and LimitException occurred in Apex source, [try...catch...] also not working in js.
System.LimitException cannot catch by [try...catch...] in Apex.
When call Apex method in lwc and LimitException occurred in Apex source, [try...catch...] also not working in js.
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;
}
}
}
Reget data and raletive list data, but not reload page or redirect url.
$A.get('e.force:refreshView').fire();
import { getRecordNotifyChange } from 'lightning/uiRecordApi';
getRecordNotifyChange([{recordId: this.recordId1},{recordId: this.recordId2}]);
or
ツールなど経由して作成した項目はよく項目レベルセキュリティー権限をセットしていないです。
個別で項目レベルセキュリティーを設定するのは時間かかります。
一括管理の方法
1権限セット
2プロファイル:設定>プロファイル>項目レベルセキュリティ
import { LightningElement, api } from 'lwc';
import { getRecordNotifyChange } from 'lightning/uiRecordApi';
export default class PageCmp extends LightningElement {
@api recordId;
doChanged() {
// Refresh Detail Page
getRecordNotifyChange([{recordId: this.recordId}]);
}
}
<div id="1">HELLO</div>
When id is number likes: 1,
CSS.escape(1)
document.querySelector("#\\31");
In Aura
if ($A.get("$Browser.formFactor") != 'DESKTOP') {
// do something for mobile only here
}
In LWC
import formFactorPropertyName from '@salesforce/client/formFactor'
if (formFactorPropertyName == "Large") {
// Large—A desktop client.
// Medium—A tablet client.
// Small—A phone client.
}
Aura
Add style tag to aura component.
<aura:component implements="force:lightningQuickAction,force:hasRecordId">
<aura:html tag="style"> .slds-modal__container { min-width: 80vw; } </aura:html>
<aura:attribute name="recordId" type="String" required="false" description="" access="global"/>
<c:childCmp recordId="{!v.recordId}" onclose="{!c.closeModal}"></c: childCmp>
</aura:component>
LWC
Some issue of quick action in LWC.
Can not change type of Lightning Web Component after deploy.
Can not get recordId & objectApiName at init.
Not working in mobile & Experience(Community)
Default checkbox of lightning-datatable is multiple checkbox.
Set atrribute [max-row-selection="1"] can change to radio checkbox.
Java Runtime 52.0 -> Java 8
Java Runtime 55.0 -> Java 11 or new
So need install Java 11 or new to replace Java 8.
After installed java 11, do not forget to check you Environment Variables [JAVA_HOME].
Make sure JAVA_HOME is the new path to java 11 file.