英文:
How to create Success message with column value displayed in APEX
问题
“Ron成功地移动到另一个表格。”
英文:
I have the following table
id | first_name | last_name |
---|---|---|
1 | Harry | Potter |
2 | Hermione | Granger |
3 | Ron | Weasley |
I created a button with process that deletes the checkbox selected row and moves it to another table:
INSERT INTO target_table (PK_1, first_name, last_name)
SELECT PK, first_name, last_name FROM source_table WHERE PK IN (SELECT column_value FROM apex_string.split(:P3_SELECTED_ID,':'));
DELETE FROM source_table WHERE PK IN (SELECT column_value FROM apex_string.split(:P3_SELECTED_ID,':'));
I would like to create a Success message when the rows is deleted which looks like the following:
"Ron was successfully moved to another table"
What I tried so far?
I created a success message in Process - Identification -Success Message
> first_name was successfully moved to another table
But this does not display the first_name as Ron or any other selected row. How to I solve this?
答案1
得分: 1
以下是翻译好的部分:
有2件重要的事情在这里
- 在Apex中引用某物时,请使用页面项目。
- 在HTML中引用页面项目的语法是
&P_ITEM.
语法。
因此,成功消息应该类似于
请确保使用要从表中删除的值填充页面项目。请注意,页面项目是标量值。要获取多个值,请使用逗号分隔的列表。
英文:
There are 2 things of importance here
- To reference something in apex, use page items.
- The syntax for referencing a page item in html is the
&P_ITEM.
syntax.
So the success message should be something like
&P1_FIRST_NAME. was successfully moved to another table
Make sure to populate the page item with the value you are deleting from the table. Note that page items are scalar values. To get multiple values, use a comma separated list.
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论