東海仙境傳說

 找回密碼
 立即註冊
搜索
熱搜: 活動 交友 discuz
查看: 5|回復: 0

JQuery UI dialogs for standard pages JQuery

[複製鏈接]

1

主題

1

帖子

9

積分

新手上路

Rank: 1

積分
9
發表於 2024-4-30 18:52:20 | 顯示全部樓層 |閱讀模式

UI Do you use custom buttons on standard pages and want to display a dialog before executing a function? Then JQuery UI is the solution. JQuery UI offers these advantages JQuery UI offers you the option of creating a modal via JavaScript and embedding a Visualforce page in it, for example to process user input or to output warning or error messages from JavaScript. By default, JavaScript only offers the option of displaying a simple message to the user using the alert() function. However, if we're honest, alert() messages don't look very attractive and different display for alert and success messages is not possible. Below I will explain to you in four short steps how you can create an attractive dialog for JavaScript buttons.

Our e-book on Salesforce development E-Book: Salesforce Development  Indonesia WhatsApp Number List Choosing the right development environment, deadly sins of Salesforce development and much more. Example: Account archiving scenario For many Salesforce customers, accounts are not deleted, but simply archived so as not to lose historical data. For this purpose, the Boolean field “isArchived” is used on the account. So that archiving is as easy for the user as the standard deletion of a record, there should be a custom button for archiving on the account object. Up to this point, the requirement can be represented with a simple custom button. In our example, however, the user must provide a reason for each archiving.



This requirement makes the implementation significantly more complex, as it is not easily possible to extend a JavaScript button to an input dialog. For this example I will use a total of four components. A JavaScript file that is saved as a static resource. A custom JavaScript button. An APEX class. A Visualforce Page. 1. Create a JavaScript file as a static resource The JavaScript file is used to define the JQuery UI modal. ated the JavaScript file, save it as a static resource in Salesforce under the name archiveAccountJS. 2. Create an Apex Controller Next, an APEX class is created, which is used to map the logic of the Visualforce page.

您需要登錄後才可以回帖 登錄 | 立即註冊

本版積分規則

Archiver|手機版|自動贊助|GameHost抗攻擊論壇贊助架設

GMT+8, 2025-4-18 19:46 , Processed in 0.033498 second(s), 18 queries .

抗攻擊 by GameHost X3.4

Copyright © 2001-2021, Tencent Cloud.

快速回復 返回頂部 返回列表
一粒米 | 中興米 | 論壇美工 | 設計 抗ddos | 天堂私服 | ddos | ddos | 防ddos | 防禦ddos | 防ddos主機 | 天堂美工 | 設計 防ddos主機 | 抗ddos主機 | 抗ddos | 抗ddos主機 | 抗攻擊論壇 | 天堂自動贊助 | 免費論壇 | 天堂私服 | 天堂123 | 台南清潔 | 天堂 | 天堂私服 | 免費論壇申請 | 抗ddos | 虛擬主機 | 實體主機 | vps | 網域註冊 | 抗攻擊遊戲主機 | ddos |