Search In This Blog

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

setTimeout(() => {
    eval("$A.get('e.force:refreshView').fire();");
},1000)

オブジェクト項目レベルセキュリティの一括管理

ツールなど経由して作成した項目はよく項目レベルセキュリティー権限をセットしていないです。

個別で項目レベルセキュリティーを設定するのは時間かかります。

一括管理の方法

1権限セット

2プロファイル:設定>プロファイル>項目レベルセキュリティ


2022-09-07

LWC: refresh record detail page

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}]);

    }

}

DOMException: Failed to execute 'querySelectorAll' on 'Element': '#1' is not a valid selector.

<div id="1">HELLO</div>

When id is number likes: 1,

CSS.escape(1)

 

document.querySelector("#\\31");

 

2022-08-29

The selected number not displayed in the "lightning-combobox"?

The value of your options is a number, while event.detail.value holds a string.

After selecting an option, this. currentValue will hold a wrong value, i.e. '2022' instead of 2022.

convert to number: 
handleChange (event) {
    this.currentValue = +event.detail.value;
}