salesforce - 将参数从 VF 页面传递到命令按钮操作
问题描述
我有 VF 页面并通过自定义按钮将参数传递给 VF URL,因为https://abc--c.cs41.visual.force.com/apex/Send_Env_Email?OppId=00655D0Z8
我想在同一页面中检索它,因此我可以在命令按钮中传递它,以便调用其他控制器方法
<apex:page controller="test_Controller1">
<apex:form >
<apex:pageBlock >
<h1>Send a Signing Request via Email</h1>
<p>This form will send a DocuSign signing request.
Are you sure you want to send it?</p>
<p><apex:commandButton action="{!send}" onclick="clicked();" rerender="dssdk_output" value="Send!" /></p>
</apex:pageBlock>
</apex:form>
因为inside 是send()
在test_Controller1
寻找输入参数Public void send(set<id> oppIds)
解决方案
如果我正确理解您要完成的工作;您不需要将它从页面传递给控制器。您可以在控制器中访问 url 参数。
public pageReference send()
{
String oppID = ApexPages.CurrentPage().getParameters().get('OppId');
--Rest of your code here --
}
然后,您可以使用 oppID 附加到您将用户重定向到的页面。
推荐阅读
- firebase - Firebase TensorFlow Lite 模型
- java - 通过 Ebean 提交的大量提交
- sql-server - 在实例之间复制数据库时列名无效
- php - 作曲家 auth.json 不工作/忽略 auth.json
- javascript - 离子反应 + FIrebase。更新 firebase 中的数据时。循环项目被填充两次
- maven - 问:Nexus 中的代理 repo 无法从远程 repo 下载特殊的 SNAPSHOT 结构
- docker - 空 ElasticSearch 容器启动慢(针对自动化测试的情况)
- symfony - Symfony - 通过IP将用户重定向到国家路由
- blazor - Blazor 服务器端恒定的 http GET/POST 流量 - 为什么?
- c# - 如何检查数组中的所有对象是否满足要求?