{"id":4119,"date":"2024-02-24T15:59:48","date_gmt":"2024-02-24T07:59:48","guid":{"rendered":"http:\/\/www.ponybai.com\/?p=4119"},"modified":"2023-12-05T18:07:12","modified_gmt":"2023-12-05T10:07:12","slug":"%e4%bd%bf%e7%94%a8-visualforce-%e6%b8%b2%e6%9f%93%e6%b5%81%e7%a8%8b","status":"publish","type":"post","link":"http:\/\/www.ponybai.com\/?p=4119","title":{"rendered":"\u4f7f\u7528 Visualforce \u6e32\u67d3\u6d41\u7a0b"},"content":{"rendered":"\n<p>\u65e0\u6cd5\u4f7f\u7528 \u6d41\u751f\u6210\u5668\u3002\u4f46\u662f\uff0c\u5728 Visualforce \u9875\u9762\u4e2d\u5d4c\u5165\u6d41\u7a0b\u540e\uff0c\u5373\u53ef\u4f7f\u7528 Apex \u4ee3\u7801 \u548c Visualforce \u6807\u8bb0\uff0c\u7528\u4e8e\u5728\u8fd0\u884c\u65f6\u914d\u7f6e\u6d41\u7a0b\uff0c\u4f8b\u5982\u5728 Visualforce \u9875\u9762\u548c\u6d41\u7a0b\uff0c\u6216\u5728\u8fd0\u884c\u65f6\u81ea\u5b9a\u4e49\u6d41\u7a0b\u7684\u5916\u89c2\u3002<\/p>\n\n\n\n<p><dfn>\u6d41<\/dfn>\u662f\u4e00\u4e2a\u5e94\u7528\u7a0b\u5e8f\uff0c\u7528\u4e8e\u6536\u96c6\u3001\u66f4\u65b0\u3001\u7f16\u8f91\u3001 \u5e76\u521b\u5efa Salesforce \u4fe1\u606f\u3002<\/p>\n\n\n\n<p>\u4ee5\u4e0b\u4e3b\u9898\u6f14\u793a\u5982\u4f55\u5728 Visualforce \u4e2d\u5d4c\u5165\u548c\u914d\u7f6e\u6d41\u7a0b \u9875\u3002<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>\u5728 Visualforce \u9875\u9762\u4e2d\u5d4c\u5165\u6d41\u7a0b \u8981\u81ea\u5b9a\u4e49\u6d41\u7a0b\u7684\u5916\u89c2\u6216\u589e\u5f3a\u5176\u529f\u80fd\uff0c\u8bf7\u5c06\u5176<strong>\u5d4c\u5165\u5230 Visualforce \u9875\u9762<\/strong><br>\u4e2d\u3002\u5982\u679c\u60a8\u7684\u7ec4\u7ec7\u4e3a\u7ad9\u70b9\u548c\u95e8\u6237\u542f\u7528\u4e86\u6d41\u7a0b\uff0c\u8bf7\u4f7f\u7528 Visualforce \u9875\u9762\u5c06\u6d41\u7a0b\u4f20\u9001\u5230\u60a8\u7684 Salesforce \u7ad9\u70b9\u3001\u95e8\u6237\u6216 Experience Cloud \u7ad9\u70b9\u3002<\/li>\n\n\n\n<li><strong>\u4f7f\u7528 &lt;flow\uff1ainterview> \u7684\u9ad8\u7ea7\u793a\u4f8b<\/strong><br>\u8be5\u7ec4\u4ef6\u65e8\u5728\u4f7f\u5f00\u53d1\u590d\u6742\u7684 Visualforce \u4ea4\u4e92\u53d8\u5f97\u5bb9\u6613\u3002\u60a8\u53ef\u4ee5\u901a\u8fc7\u521b\u5efa\u81ea\u5b9a\u4e49\u63a7\u5236\u5668\u6765\u8bbf\u95ee\u6d41\u4e2d\u7684\u5176\u4ed6\u529f\u80fd\u3002\u4f7f\u7528\u81ea\u5b9a\u4e49\u63a7\u5236\u5668\uff0c\u60a8\u53ef\u4ee5\u6784\u5efa\u4e00\u4e2a\u5305\u542b\u591a\u4e2a\u7ec4\u4ef6\u7684\u9875\u9762\uff0c\u8fd9\u4e9b\u7ec4\u4ef6\u53ef\u4ee5\u76f8\u4e92\u4ea4\u4e92\u3002\u7ec4\u7ec7\u5185\u7684\u4efb\u4f55\u6d41\u90fd\u53ef\u4ee5\u7531\u5176\u81ea\u5df1\u7684 Apex \u7c7b\u578b\u5355\u72ec\u5f15\u7528\uff0c\u5e76\u4e14\u6d41\u4e2d\u7684\u53d8\u91cf\u53ef\u4ee5\u4f5c\u4e3a\u6210\u5458\u53d8\u91cf\u8fdb\u884c\u8bbf\u95ee\u3002<samp>&lt;flow:interview><\/samp><\/li>\n\n\n\n<li>\u4ece Visualforce \u9875\u9762\u8bbe\u7f6e\u6d41\u53d8\u91cf\u503c \u5c06\u6d41\u7a0b\u5d4c\u5165\u00a0<strong>Visualforce \u9875\u9762<\/strong><br>\u540e\uff0c\u901a\u8fc7\u7ec4\u4ef6\u8bbe\u7f6e\u53d8\u91cf\u3001\u8bb0\u5f55\u53d8\u91cf\u3001\u96c6\u5408\u53d8\u91cf\u548c\u8bb0\u5f55\u96c6\u5408\u53d8\u91cf\u7684\u521d\u59cb\u503c\u3002<samp>&lt;apex:param><\/samp><\/li>\n\n\n\n<li><strong>\u5c06\u6d41\u53d8\u91cf\u503c\u83b7\u53d6\u5230<\/strong>\u00a0Visualforce \u9875\u9762 \u6d41\u53d8\u91cf\u503c\u53ef\u4ee5\u663e\u793a\u5728 Visualforce \u9875\u9762<br>\u4e2d\u3002\u5c06\u6d41\u7a0b\u5d4c\u5165 Visualforce \u9875\u9762\u540e\uff0c\u60a8\u53ef\u4ee5\u4f7f\u7528 Visualforce \u6807\u8bb0\u6765\u83b7\u53d6\u53d8\u91cf\u7684\u503c\u6216\u8bb0\u5f55\u53d8\u91cf\u3002\u82e5\u8981\u663e\u793a\u96c6\u5408\u53d8\u91cf\u6216\u8bb0\u5f55\u96c6\u5408\u53d8\u91cf\u7684\u503c\uff0c\u53ef\u4ee5\u4f7f\u7528 Visualforce \u6807\u8bb0\u6765\u83b7\u53d6\u96c6\u5408\u4e2d\u5305\u542b\u7684\u5404\u4e2a\u503c\u3002<\/li>\n\n\n\n<li><strong>\u63a7\u5236\u7528\u6237\u662f\u5426\u53ef\u4ee5\u6682\u505c<\/strong>\u00a0Visualforce \u9875\u9762\u4e2d\u7684\u6d41\u7a0b \u4f7f\u7528\u7ec4\u4ef6\u5c06\u6d41\u7a0b\u5d4c\u5165\u5230 Visualforce \u9875\u9762\u4e2d\u540e\uff0c\u8bf7\u8003\u8651\u662f\u5426\u5141\u8bb8\u7528\u6237\u6682\u505c\u8be5\u9875\u9762<br>\u4e2d\u7684\u6d41\u7a0b\u3002\u5c06\u8be5\u5c5e\u6027\u8bbe\u7f6e\u4e3a false \u53ef\u9632\u6b62\u7528\u6237\u6682\u505c\u3002<samp>&lt;flow:interview>allowShowPause<\/samp><\/li>\n\n\n\n<li><strong>\u81ea\u5b9a\u4e49\u7528\u6237\u5982\u4f55<\/strong>\u6062\u590d\u6682\u505c\u7684\u6d41\u7a0b\u9762\u8bd5 \u9ed8\u8ba4\u60c5\u51b5\u4e0b\uff0c\u7528\u6237\u53ef\u4ee5\u4ece\u5176\u4e3b\u9875\u4e0a\u7684\u201c\u6682\u505c\u9762\u8bd5\u201d\u7ec4\u4ef6\u6062\u590d\u6682\u505c\u7684\u9762\u8bd5<br>\u3002\u5982\u679c\u8981\u81ea\u5b9a\u4e49\u7528\u6237\u6062\u590d\u91c7\u8bbf\u7684\u65b9\u5f0f\u548c\u4f4d\u7f6e\uff0c\u8bf7\u4f7f\u7528\u7ec4\u4ef6\u4e0a\u7684\u5c5e\u6027\u3002<samp>pausedInterviewId&lt;flow:interview><\/samp><\/li>\n\n\n\n<li><strong>\u5728\u6d41\u7a0b\u4e2d\u914d\u7f6e finishLocation \u5c5e\u6027<\/strong>\u00a0\u5982\u679c\u672a\u6307\u5b9a\uff0c\u5219\u5355\u51fb\u201c\u5b8c\u6210\u201d\u7684\u7528\u6237\u5c06\u5f00\u59cb\u65b0\u7684\u9762\u8bd5\uff0c\u5e76\u770b\u5230\u6d41\u7a0b\u7684\u7b2c\u4e00\u4e2a\u5c4f\u5e55\u3002<br>\u60a8\u53ef\u4ee5\u4f7f\u7528\u51fd\u6570\u3001\u53d8\u91cf\u6216\u63a7\u5236\u5668\u6765\u8c03\u6574\u7528\u6237\u5728\u6700\u540e\u4e00\u4e2a\u5c4f\u5e55\u4e0a\u5355\u51fb<strong>\u201c\u5b8c\u6210<\/strong>\u201d\u65f6\u53d1\u751f\u7684\u60c5\u51b5\u3002<samp>finishLocationURLFOR$Page<\/samp><\/li>\n\n\n\n<li><strong>\u81ea\u5b9a\u4e49\u6d41\u7a0b\u7684\u7528\u6237\u754c\u9762<\/strong><br>\u5728 Visualforce \u9875\u9762\u4e2d\u5d4c\u5165\u6d41\u7a0b\u540e\uff0c\u60a8\u53ef\u4ee5\u901a\u8fc7\u4f7f\u7528 CSS \u5e94\u7528\u81ea\u5b9a\u4e49\u6837\u5f0f\u6765\u81ea\u5b9a\u4e49\u6d41\u7a0b\u5728\u8fd0\u884c\u65f6\u7684\u5916\u89c2\u3002\u4f7f\u7528\u6d41\u5c5e\u6027\u548c CSS \u7c7b\u7684\u7ec4\u5408\uff0c\u60a8\u53ef\u4ee5\u81ea\u5b9a\u4e49\u6d41\u7684\u5404\u4e2a\u90e8\u5206\uff0c\u4f8b\u5982\u6309\u94ae\u4f4d\u7f6e\u3001\u6309\u94ae\u6837\u5f0f\u3001\u80cc\u666f\u4ee5\u53ca\u5c4f\u5e55\u6807\u7b7e\u7684\u5916\u89c2\u3002<\/li>\n\n\n\n<li>\u5728 Visualforce \u9875\u9762\u4e2d<strong>\u6e32\u67d3\u6d41\u7684 Lightning \u8fd0\u884c\u65f6<\/strong>\u00a0\u9ed8\u8ba4\u60c5\u51b5\u4e0b\uff0c\u5f53\u60a8\u5728 Visualforce \u9875\u9762<br>\u4e2d\u5d4c\u5165\u6d41\u65f6\uff0c\u8be5\u6d41\u5c06\u5728 Classic \u8fd0\u884c\u65f6\u4e2d\u5448\u73b0\u3002\u987e\u540d\u601d\u4e49\uff0cClassic \u8fd0\u884c\u65f6\u7684\u5916\u89c2\u548c\u611f\u89c9\u7c7b\u4f3c\u4e8e\u5e38\u89c4\u7684 Visualforce \u9875\u9762\u548c Salesforce Classic \u684c\u9762\u4f53\u9a8c\u3002\u5982\u679c\u60a8\u5e0c\u671b\u6d41\u7a0b\u5728 Visualforce \u9875\u9762\u7684 Lightning \u8fd0\u884c\u65f6\u4e2d\u5448\u73b0\uff0c\u8bf7\u5c06\u6d41\u7a0b Aura \u7ec4\u4ef6\u5d4c\u5165\u5230 Visualforce \u9875\u9762\u3002<\/li>\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\">\u5728 Visualforce Pages \u4e2d\u5d4c\u5165\u6d41\u7a0b<\/h2>\n\n\n\n<p>\u8981\u81ea\u5b9a\u4e49\u6d41\u7684\u5916\u89c2\u6216\u589e\u5f3a\u5176\u529f\u80fd\uff0c\u8bf7\u5c06\u5176\u5d4c\u5165\u5230 Visualforce \u9875\u9762\u3002\u5982\u679c\u60a8\u7684\u7ec4\u7ec7\u4e3a\u7ad9\u70b9\u548c\u95e8\u6237\u542f\u7528\u4e86\u6d41\u7a0b\uff0c\u8bf7\u4f7f\u7528 Visualforce \u9875\u9762\uff0c\u5c06\u6d41\u7a0b\u4f20\u9001\u5230\u60a8\u7684 Salesforce \u7ad9\u70b9\u3001\u95e8\u6237\u6216 Experience Cloud \u7f51\u7ad9\u3002<\/p>\n\n\n\n<p>\u6ce8\u610f<\/p>\n\n\n\n<p>\u7528\u6237\u53ea\u80fd\u8fd0\u884c\u5177\u6709\u6d3b\u52a8\u72b6\u6001\u7684\u6d41 \u7248\u672c\u3002\u5982\u679c\u5d4c\u5165\u7684\u6d41\u6ca1\u6709\u6d3b\u52a8\u7248\u672c\uff0c\u7528\u6237\u4f1a\u770b\u5230\u9519\u8bef \u6d88\u606f\u3002\u5982\u679c\u5d4c\u5165\u7684\u6d41\u5305\u542b Subflow \u5143\u7d20\uff0c\u5219\u5f15\u7528\u7684\u6d41 \u5e76\u4e14\u7531 Subflow \u5143\u7d20\u8c03\u7528\u5fc5\u987b\u5177\u6709\u6d3b\u52a8\u7248\u672c\u3002\u8981\u5411 Visualforce \u9875\u9762\u6dfb\u52a0\u6d41\u7a0b\uff0c\u8bf7\u4f7f\u7528\u4ee5\u4e0b\u7ec4\u4ef6\u5d4c\u5165\u8be5\u6d41\u7a0b\uff1a<\/p>\n\n\n\n<p><samp>&lt;flow:interview&gt;<\/samp><\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li>\u67e5\u627e\u6d41\u7684 API \u540d\u79f0\u3002\n<ol class=\"wp-block-list\" style=\"list-style-type:lower-alpha\">\n<li>\u5728\u201c\u8bbe\u7f6e\u201d\u4e2d\uff0c\u8f93\u5165\u201c\u5feb\u901f\u201d \u201c\u67e5\u627e\u201d\u6846\uff0c\u7136\u540e\u9009\u62e9<strong>\u201c\u6d41<\/strong>\u201d\u3002<kbd>Flows<\/kbd><\/li>\n\n\n\n<li>\u5355\u51fb\u8981\u5d4c\u5165\u7684\u6d41\u7684\u540d\u79f0\u3002<\/li>\n<\/ol>\n<\/li>\n\n\n\n<li>\u5b9a\u4e49\u65b0\u7684 Visualforce \u9875\u9762\u6216\u6253\u5f00\u8981\u7f16\u8f91\u7684\u9875\u9762\u3002<\/li>\n\n\n\n<li>\u6dfb\u52a0\u7ec4\u4ef6\uff0c \u5728\u6807\u7b7e\u4e4b\u95f4\u7684\u67d0\u4e2a\u5730\u65b9\u3002<samp>&lt;flow:interview&gt;<\/samp><samp>&lt;apex:page&gt;<\/samp><\/li>\n\n\n\n<li>\u5c06\u5c5e\u6027\u8bbe\u7f6e\u4e3a\u552f\u4e00\u5c5e\u6027 \u6d41\u7684\u540d\u79f0\u3002\u4f8b\u5982\uff1a<samp>name<\/samp><code>&lt;apex:page&gt; &lt;flow:interview name=\"flowAPIName\"\/&gt; &lt;\/apex:page&gt;<\/code>\u6ce8\u610f\u5982\u679c\u6d41\u7a0b\u662f \u5728\u6258\u7ba1\u5305\u4e2d\uff0c\u8be5\u5c5e\u6027\u5fc5\u987b\u662f \u91c7\u7528\u4ee5\u4e0b\u683c\u5f0f\uff1a.<samp>name<\/samp><samp>namespace.flowuniquename<\/samp><\/li>\n\n\n\n<li>\u901a\u8fc7\u4e3a \u5305\u542b\u5b83\u7684 Visualforce \u9875\u9762\u3002\u82e5\u8981\u8fd0\u884c\u6d41\uff0c\u5916\u90e8\u7528\u6237\uff08\u4f8b\u5982 \u5728 Experience Cloud \u7ad9\u70b9\u4e0a\uff09\u9700\u8981\u8bbf\u95ee Visualforce \u9875\u9762\u3002\u8981\u8fd0\u884c \u6d41\u7a0b\u4e2d\uff0c\u5185\u90e8\u7528\u6237\u9700\u8981\u8bbf\u95ee Visualforce \u9875\u9762\uff0c\u5e76\u4e14\uff1a\n<ul class=\"wp-block-list\">\n<li>\u201c\u8fd0\u884c\u6d41\u201d\u6743\u9650<\/li>\n\n\n\n<li>\u5728\u5176\u7528\u6237\u4e0a\u542f\u7528\u4e86 Flow User&nbsp;\u5b57\u6bb5 \u8be6\u60c5\u9875\u9762<\/li>\n\n\n\n<li>\u5982\u679c<strong>\u8986\u76d6\u9ed8\u8ba4\u884c\u4e3a\u5e76\u9650\u5236\u5bf9 \u5df2\u542f\u7528\u7684\u914d\u7f6e\u6587\u4ef6\u6216\u6743\u9650\u96c6<\/strong>\u88ab\u9009\u4e2d \u5355\u4e2a\u6d41\uff0c\u7528\u6237\u6309\u914d\u7f6e\u6587\u4ef6\u8bbf\u95ee\u8be5\u6d41 \u6216\u6743\u9650\u96c6<\/li>\n<\/ul>\n<\/li>\n<\/ol>\n\n\n\n<h2 class=\"wp-block-heading\">\u5728\u6d41\u7a0b\u4e2d\u8bbe\u7f6e\u53d8\u91cf\u503c<\/h2>\n\n\n\n<p>\u5728\u8fd9\u4e2a \u4f8b\u5982\uff0c\u6211\u4eec\u5c06\u6784\u5efa\u4e00\u4e2a\u7b80\u5355\u7684\u6d41\u7a0b\uff0c\u4ee5\u5141\u8bb8\u5ba2\u6237\u652f\u6301\u4ee3\u7406 \u901a\u8fc7\u521b\u5efa\u6848\u4f8b\u5bf9\u8c03\u5236\u89e3\u8c03\u5668\u95ee\u9898\u8fdb\u884c\u6545\u969c\u6392\u9664\u3002\u60a8\u53ef\u4ee5\u5728\u542f\u52a8\u6d41\u901a\u8fc7\u7ec4\u4ef6\u65f6\u8bbe\u7f6e\u53d8\u91cf\u7684\u503c\u3002\u5bf9\u4e8e\u6211\u4eec\u7684 \u793a\u4f8b\uff0c\u8bbe\u7f6e\u4f7f\u7528\u521d\u59cb\u503c\u8c03\u7528\u7684\u6848\u4f8b\u7f16\u53f7\u53d8\u91cf 01212212\u5f53\u6d41\u52a0\u8f7d\u65f6\uff0c\u8bf7\u4f7f\u7528\u4ee5\u4e0b\u6807\u8bb0\uff1a<\/p>\n\n\n\n<p><samp>&lt;apex:param&gt;<\/samp><samp>vaCaseNumber<\/samp><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>&lt;apex:page&gt;\n    &lt;flow:interview name=\"ModemTroubleShooting\"&gt;\n        &lt;apex:param name=\"vaCaseNumber\" value=\"01212212\"\/&gt;\n    &lt;\/flow:interview&gt;\n&lt;\/apex:page&gt;<\/code><\/pre>\n\n\n\n<p>\u60a8\u8fd8\u53ef\u4ee5\u4f7f\u7528\u6807\u51c6 Visualforce \u63a7\u5236\u5668\u8bbe\u7f6e\u53d8\u91cf\u3002\u4f8b\u5982\uff0c\u5982\u679c Visualforce\u9875\u9762\u6b63\u5728\u4f7f\u7528\u63a7\u5236\u5668\uff0c\u53ef\u4ee5\u589e\u5f3a\u9875\u9762\u4f20\u5165\u6807\u51c6\u4e2d\u7684\u6570\u636e \u63a7\u5236\u5668\u3002<\/p>\n\n\n\n<p><samp>standardCase<\/samp><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>&lt;apex:page standardController=\"Case\" tabStyle=\"Case\" &gt;\n    &lt;flow:interview name=\"ModemTroubleShooting\"&gt;\n        &lt;apex:param name=\"vaCaseNumber\" value=\"{!Case.CaseNumber}\"\/&gt;\n    &lt;\/flow:interview&gt;\n&lt;\/apex:page&gt;<\/code><\/pre>\n\n\n\n<p>\u6709\u5173\u8bbe\u7f6e\u53d8\u91cf\u503c\u7684\u66f4\u591a\u793a\u4f8b\uff0c\u8bf7\u53c2\u89c1\u4ece Visualforce \u9875\u9762\u8bbe\u7f6e\u6d41\u53d8\u91cf\u503c\u3002\u4e3a \u6709\u5173\u4ece\u6d41\u7a0b\u4e2d\u83b7\u53d6\u53d8\u91cf\u503c\u4ee5\u5728 Visualforce \u4e2d\u663e\u793a\u7684\u4fe1\u606f \u9875\u9762\u4e0a\uff0c\u8bf7\u53c2\u9605\u5c06\u6d41\u53d8\u91cf\u503c\u83b7\u53d6\u5230 Visualforce \u9875\u9762\u3002<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">\u8bbe\u7f6e&nbsp;finishLocation&nbsp;\u5c5e\u6027<\/h2>\n\n\n\n<p>\u57fa\u4e8e\u8c03\u5236\u89e3\u8c03\u5668\u6545\u969c\u6392\u9664\u793a\u4f8b\uff0c\u6211\u4eec\u8fd8\u5c06\u8bbe\u7f6e\u5c5e\u6027\u4ee5\u5c06\u7528\u6237\u91cd\u5b9a\u5411\u5230 Salesforce \u4e3b\u9875 \u9875\u9762\uff0c\u5f53\u4ed6\u4eec\u5355\u51fb\u672b\u5c3e\u7684<strong>\u201c\u5b8c\u6210<\/strong>\u201d\u6309\u94ae\u65f6 \u6d41\u3002<\/p>\n\n\n\n<p><samp>finishLocation<\/samp><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>&lt;apex:page standardController=\"Case\" tabStyle=\"Case\" &gt;\n    &lt;flow:interview name=\"ModemTroubleShooting\" finishLocation=\"{!URLFOR('\/home\/home.jsp')}\"&gt;\n        &lt;apex:param name=\"vaCaseNumber\" value=\"{!case.CaseNumber}\"\/&gt;\n    &lt;\/flow:interview&gt;\n&lt;\/apex:page&gt;<\/code><\/pre>\n\n\n\n<p>\u6709\u5173\u8bbe\u7f6e\u7684\u66f4\u591a\u793a\u4f8b\uff0c\u8bf7\u53c2\u9605\u5728\u6d41\u4e2d\u914d\u7f6e finishLocation \u5c5e\u6027\u3002<samp>finishLocation<\/samp><\/p>\n\n\n\n<h2 class=\"wp-block-heading\">\u4f7f\u7528&nbsp;&lt;flow\uff1ainterview&gt;&nbsp;\u7684\u9ad8\u7ea7\u793a\u4f8b<\/h2>\n\n\n\n<p>\u7ec4\u4ef6\u8bbe\u8ba1 \u4ee5\u4fbf\u8f7b\u677e\u5f00\u53d1\u590d\u6742\u7684 Visualforce \u4ea4\u4e92\u3002\u60a8\u53ef\u4ee5 \u901a\u8fc7\u521b\u5efa\u81ea\u5b9a\u4e49\u63a7\u5236\u5668\u6765\u8bbf\u95ee\u6d41\u7a0b\u4e2d\u7684\u5176\u4ed6\u529f\u80fd\u3002\u5e26\u5b9a\u5236 \u63a7\u5236\u5668\uff0c\u60a8\u53ef\u4ee5\u6784\u5efa\u4e00\u4e2a\u5305\u542b\u591a\u4e2a\u7ec4\u4ef6\u7684\u9875\u9762\uff0c\u8fd9\u4e9b\u7ec4\u4ef6\u53ef\u4ee5\u4e0e\u6bcf\u4e2a\u7ec4\u4ef6\u8fdb\u884c\u4ea4\u4e92 \u5176\u4ed6\u3002\u7ec4\u7ec7\u5185\u7684\u4efb\u4f55\u6d41\u90fd\u53ef\u4ee5\u7531\u5176\u81ea\u5df1\u7684 Apex \u5355\u72ec\u5f15\u7528 \u7c7b\u578b\uff0c\u5e76\u4e14\u6d41\u4e2d\u7684\u53d8\u91cf\u53ef\u4ee5\u4f5c\u4e3a\u6210\u5458\u53d8\u91cf\u8fdb\u884c\u8bbf\u95ee\u3002<\/p>\n\n\n\n<p><samp>&lt;flow:interview&gt;<\/samp><\/p>\n\n\n\n<p>\u6ce8\u610f<\/p>\n\n\n\n<p>\u4f60 \u53ea\u80fd\u8bbe\u7f6e\u5141\u8bb8\u8f93\u5165\u8bbf\u95ee\u7684\u53d8\u91cf\uff0c\u5e76\u4e14\u53ea\u80fd\u83b7\u53d6 \u5141\u8bb8\u8f93\u51fa\u8bbf\u95ee\u3002\u5bf9\u4e8e\u4e0d\u5141\u8bb8\u8f93\u5165\u6216\u8f93\u51fa\u8bbf\u95ee\u7684\u53d8\u91cf\uff0c\u5c1d\u8bd5 get \u53d8\u91cf\u88ab\u5ffd\u7565\uff0c\u5e76\u4e14 Visualforce \u9875\u9762\u3001\u5176\u7ec4\u4ef6\u6216 Apex \u7c7b\u7684\u7f16\u8bd1\u53ef\u80fd\u4f1a\u5931\u8d25\u3002<samp>&lt;apex:page&gt;<\/samp>\u5728\u4e0b\u4e00\u4e2a\u793a\u4f8b\u4e2d\uff0cAPI \u540d\u79f0\u4e3a\u201cModemTroubleShooting\u201d\u7684\u6d41\u662f \u5f15\u7528\u4e3a \u3002\u6807\u8bb0\u6f14\u793a\u4e86\u5982\u4f55\u663e\u793a \u4e0d\u540c\u90e8\u5206\u7684\u6d41\u53d8\u91cf\u7684\u503c \u9875\uff1a<\/p>\n\n\n\n<p><samp>Flow.Interview.ModemTroubleShooting<\/samp><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>&lt;apex:page Controller=\"ModemTroubleShootingCustomSimple\" tabStyle=\"Case\"&gt;\n    &lt;flow:interview name=\"ModemTroubleShooting\" interview=\"{!myflow}\"\/&gt;\n    &lt;apex:outputText value=\"Default Case Prioriy: {!casePriority}\"\/&gt;\n&lt;\/apex:page&gt;<\/code><\/pre>\n\n\n\n<p>\u6ce8\u610f<\/p>\n\n\n\n<p>\u5982\u679c\u6d41\u7a0b\u662f \u5728\u6258\u7ba1\u5305\u4e2d\uff0c\u8be5\u5c5e\u6027\u5fc5\u987b\u662f \u91c7\u7528\u4ee5\u4e0b\u683c\u5f0f\uff1a.<samp>name<\/samp><samp>namespace.flowuniquename<\/samp>\u4e0a\u8ff0\u6807\u8bb0\u7684\u63a7\u5236\u5668\u5982\u4e0b\u6240\u793a \u8fd9\uff1a<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>public class ModemTroubleShootingCustomSimple {\n\n    \/\/ You don't need to explicitly instantiate the Flow object;\n    \/\/ the class constructor is invoked automatically\n\n    public Flow.Interview.ModemTroubleShooting myflow { get; set; }\n    public String casePriority;\n    public String getCasePriority() {\n        \/\/ Access flow variables as simple member variables with get\/set methods\n        if(myflow == null) return 'High';\n        else return myflow.vaCasePriority;\n    }\n}<\/code><\/pre>\n\n\n\n<p>\u5982\u679c\u60a8\u4f7f\u7528\u7684\u662f\u81ea\u5b9a\u4e49\u63a7\u5236\u5668\uff0c\u60a8\u8fd8\u53ef\u4ee5\u8bbe\u7f6e \u6d41\u6784\u9020\u51fd\u6570\u4e2d\u6d41\u5f00\u5934\u7684\u53d8\u91cf\u3002\u4f20\u5165 \u4f7f\u7528\u6784\u9020\u51fd\u6570\u7684\u53d8\u91cf\u662f\u53ef\u9009\u7684\uff0c\u5982\u679c\u662f \u4f7f\u7528\u6807\u7b7e\u6765\u8bbe\u7f6e\u503c\u3002<samp>&lt;apex:param&gt;<\/samp>\u4e0b\u9762\u662f\u4e00\u4e2a\u81ea\u5b9a\u4e49\u63a7\u5236\u5668\u7684\u793a\u4f8b\uff0c\u8be5\u63a7\u5236\u5668\u5728 \u4e00\u4e2a \u6784\u9020 \u51fd\u6570\u3002<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>public class ModemTroubleShootingCustomSetVariables {\n    public Flow.Interview.ModemTroubleShooting myflow { get; set; }\n \n    public ModemTroubleShootingCustomSetVariables() {\n        Map&lt;String, Object&gt; myMap = new Map&lt;String, Object&gt;();\n        myMap.put('vaCaseNumber','123456');\n        myflow = new Flow.Interview.ModemTroubleShooting(myMap);\n    }\n \n    public String caseNumber { set; }\n    public String getCaseNumber() {\n        return myflow.vaCaseNumber;\n    }\n}<\/code><\/pre>\n\n\n\n<p>\u60a8\u53ef\u4ee5\u4f7f\u7528\u7c7b\u4e2d\u7684\u65b9\u6cd5\u8bbf\u95ee \u6d41\u53d8\u91cf\u3002\u53d8\u91cf\u53ef\u80fd\u4f4d\u4e8e Visualforce \u9875\u9762\u4e2d\u5d4c\u5165\u7684\u6d41\u7a0b\u4e2d\uff0c\u4e5f\u53ef\u80fd\u4f4d\u4e8e \u7531 Subflow \u5143\u7d20\u8c03\u7528\u7684\u5355\u72ec\u6d41\u3002\u8fd4\u56de\u7684\u53d8\u91cf\u503c\u6765\u4e86 \u65e0\u8bba\u9762\u8bd5\u5f53\u524d\u4ece\u54ea\u4e2a\u6d41\u7a0b\u8fd0\u884c\u3002\u5982\u679c\u6307\u5b9a\u7684\u53d8\u91cf \u5728\u8be5\u6d41\u4e2d\u627e\u4e0d\u5230\uff0c\u8be5\u65b9\u6cd5\u5c06\u8fd4\u56de \u3002\u6b64\u65b9\u6cd5\u5728\u8fd0\u884c\u65f6\u68c0\u67e5\u53d8\u91cf\u662f\u5426\u5b58\u5728 \u53ea\u662f\uff0c\u800c\u4e0d\u662f\u5728\u7f16\u8bd1\u65f6\u3002<samp>getVariableValue<\/samp><samp>Flow.Interview<\/samp><samp>null<\/samp>\u6b64\u793a\u4f8b\u4f7f\u7528\u8be5\u65b9\u6cd5\u83b7\u53d6\u75d5\u8ff9\u5bfc\u822a \uff08\u5bfc\u822a\uff09\u6765\u81ea\u6d41\u7684\u4fe1\u606f\u3002\u5982\u679c\u8be5\u6d41\u5305\u542b\u5b50\u6d41\u5143\u7d20\uff0c\u5e76\u4e14 \u6bcf\u4e2a\u5f15\u7528\u7684\u6d41\u8fd8\u5305\u542b\u4e00\u4e2a\u53d8\u91cf\uff0c\u60a8\u53ef\u4ee5\u4e3a\u7528\u6237\u63d0\u4f9b\u75d5\u8ff9\u5bfc\u822a\uff0c\u800c\u4e0d\u7ba1\u54ea\u4e2a\u6d41 \u9762\u8bd5\u662f \u8fd0\u884c\u3002<\/p>\n\n\n\n<p><samp>getVariableValue<\/samp><var>vaBreadCrumb<\/var><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>public class SampleController {\n\n   \/\/Instance of the flow\n   public Flow.Interview.Flow_Template_Gallery myFlow {get; set;}\n\n   public String getBreadCrumb() {\n      String aBreadCrumb;\n      if (myFlow==null) { return 'Home';}\n      else aBreadCrumb = (String) myFlow.getVariableValue('vaBreadCrumb');\n\n      return(aBreadCrumb==null ? 'Home': aBreadCrumb);\n\n   }\n}<\/code><\/pre>\n\n\n\n<p>\u4e0b\u8868\u663e\u793a\u4e86 \u6d41\u91cf\u548c\u9876\u70b9\u3002<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table><thead><tr><th>\u6d41<\/th><th>\u9876\u70b9<\/th><\/tr><\/thead><tbody><tr><td>\u53d1\u77ed\u4fe1<\/td><td>\u5b57\u7b26\u4e32<\/td><\/tr><tr><td>\u6570<\/td><td>\u5341\u8fdb\u5236<\/td><\/tr><tr><td>\u8d27\u5e01<\/td><td>\u5341\u8fdb\u5236<\/td><\/tr><tr><td>\u65e5\u671f<\/td><td>\u65e5\u671f\u3001\u65e5\u671f\u65f6\u95f4<\/td><\/tr><tr><td>\u5e03\u5c14<\/td><td>\u5e03\u5c14<\/td><\/tr><tr><td>\u4f7f\u7528\u6307\u5b9a\u5bf9\u8c61\u8fdb\u884c\u8bb0\u5f55<\/td><td>\u6307\u5b9a\u5bf9\u8c61\u7684 API \u540d\u79f0\uff0c\u4f8b\u5982 Account \u6216 \u7bb1<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<p>\u7531\u4e8e\u9488\u5bf9 Apex \u4ee3\u7801\u7f16\u5199\u6d4b\u8bd5\u662f\u4e00\u79cd\u5f88\u597d\u7684\u505a\u6cd5\uff0c\u56e0\u6b64\u4ee5\u4e0b\u662f \u7f16\u5199\u6d4b\u8bd5\u7c7b\u7684\u7b80\u5355\u793a\u4f8b\uff1a<\/p>\n\n\n\n<p><samp>ModemTroubleShootingCustomSetVariables<\/samp><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>@isTest\nprivate class ModemTroubleShootingCustomSetVariablesTest {\n\n    static testmethod void ModemTroubleShootingCustomSetVariablestests() {\n        PageReference pageRef = Page.ModemTroubleShootingSetVariables;\n        Test.setCurrentPage(pageRef);\n        ModemTroubleShootingCustomSetVariables mytestController = \n            new ModemTroubleShootingCustomSetVariables();\n        System.assertEquals(mytestController.getcaseNumber(), '01212212');\n    }\n}<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\">\u8bbe\u7f6e&nbsp;reRender&nbsp;\u5c5e\u6027<\/h2>\n\n\n\n<p>\u901a\u8fc7\u4f7f\u7528\u8be5\u5c5e\u6027\uff0c\u7ec4\u4ef6\u5c06\u91cd\u65b0\u5448\u73b0 \u5728\u4e0d\u5237\u65b0\u6574\u4e2a\u9875\u9762\u7684\u60c5\u51b5\uff1a<samp>reRender<\/samp><samp>&lt;flow:interview&nbsp;\/&gt;<\/samp><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>&lt;apex:page Controller=\"ModemTroubleShootingCustomSimple\" tabStyle=\"Case\"&gt;\n    &lt;flow:interview name=\"ModemTroubleShooting\" interview=\"{!myflow}\" \n     reRender=\"casePrioritySection\"\/&gt;\n    &lt;apex:outputText id=\"casePrioritySection\" \n     value=\"Default Case Prioriy: {!casePriority}\"\/&gt;\n&lt;\/apex:page&gt;<\/code><\/pre>\n\n\n\n<p>\u8b66\u544a<\/p>\n\n\n\n<p>\u5982\u679c\u672a\u8bbe\u7f6e\u5c5e\u6027\uff0c\u5219\u5f53\u60a8\u5355\u51fb\u6309\u94ae\u5bfc\u822a\u5230\u5176\u4ed6\u6309\u94ae\u65f6 \u5c4f\u5e55\u4e2d\uff0c\u6574\u4e2a Visualforce \u9875\u9762\u90fd\u4f1a\u5237\u65b0\uff0c \u4e0d\u4ec5\u4ec5\u662f\u7ec4\u4ef6\u3002<samp>reRender<\/samp><samp>&lt;flow:interview&gt;<\/samp><\/p>\n\n\n\n<h2 class=\"wp-block-heading\">\u4ece Visualforce \u9875\u9762\u8bbe\u7f6e\u6d41\u53d8\u91cf\u503c<\/h2>\n\n\n\n<p>\u5c06\u6d41\u7a0b\u5d4c\u5165 Visualforce \u9875\u9762\u540e\uff0c\u8bbe\u7f6e\u53d8\u91cf\u7684\u521d\u59cb\u503c\u3002 \u901a\u8fc7\u7ec4\u4ef6\u8bb0\u5f55\u53d8\u91cf\u3001\u96c6\u5408\u53d8\u91cf\u548c\u8bb0\u5f55\u96c6\u5408\u53d8\u91cf\u3002<\/p>\n\n\n\n<p><samp>&lt;apex:param&gt;<\/samp><\/p>\n\n\n\n<p>\u6ce8\u610f<\/p>\n\n\n\n<p>\u60a8\u53ea\u80fd\u5728\u9762\u8bd5\u5f00\u59cb\u65f6\u8bbe\u7f6e\u53d8\u91cf\u3002\u6807\u7b7e\u4ec5\u8bc4\u4f30\u4e00\u6b21\uff0c \u5f53\u6d41\u91cf \u63a8\u51fa\u3002<samp>&lt;apex:param&gt;<\/samp><\/p>\n\n\n\n<p>\u4f60 \u53ea\u80fd\u8bbe\u7f6e\u5141\u8bb8\u8f93\u5165\u8bbf\u95ee\u7684\u53d8\u91cf\u3002\u5982\u679c\u5f15\u7528\u7684\u53d8\u91cf \u4e0d\u5141\u8bb8\u8f93\u5165\u8bbf\u95ee\uff0c\u5219\u5ffd\u7565\u8bbe\u7f6e\u53d8\u91cf\u7684\u5c1d\u8bd5\u3002 Visualforce \u9875\u9762\u3001\u5176\u7ec4\u4ef6\u6216 Apex \u7684\u7f16\u8bd1\u53ef\u80fd\u4f1a\u5931\u8d25 \u7c7b\u3002<samp>&lt;apex:page&gt;<\/samp><\/p>\n\n\n\n<p>\u4e0b\u8868\u5217\u51fa\u4e86\u8bbe\u7f6e\u6d41\u53d8\u91cf record \u7684\u65b9\u6cd5 \u53d8\u91cf\uff0c\u5e76\u4f7f\u7528 Visualforce \u8bb0\u5f55\u96c6\u5408\u53d8\u91cf\u503c\u3002<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table><thead><tr><th>\u65b9\u6cd5<\/th><th>\u53d8\u91cf<\/th><th>\u8bb0\u5f55\u53d8\u91cf<\/th><th>\u96c6\u5408\u53d8\u91cf<\/th><th>\u8bb0\u5f55\u96c6\u5408\u53d8\u91cf<\/th><\/tr><\/thead><tbody><tr><td>\u6ca1\u6709 \u63a7\u5236\u5668<\/td><td><img decoding=\"async\" src=\"https:\/\/developer.salesforce.com\/docs\/resources\/img\/en-us\/246.0?doc_id=dev_guides%2Fimages%2Fcheckmark_16x16.png&amp;folder=pages\" alt=\"\u590d\u9009\u6807\u8bb0\"><\/td><td><\/td><td><\/td><td><\/td><\/tr><tr><td>\u4e0e\u6807\u51c6 \u63a7\u5236\u5668<\/td><td><img decoding=\"async\" src=\"https:\/\/developer.salesforce.com\/docs\/resources\/img\/en-us\/246.0?doc_id=dev_guides%2Fimages%2Fcheckmark_16x16.png&amp;folder=pages\" alt=\"\u590d\u9009\u6807\u8bb0\"><\/td><td><img decoding=\"async\" src=\"https:\/\/developer.salesforce.com\/docs\/resources\/img\/en-us\/246.0?doc_id=dev_guides%2Fimages%2Fcheckmark_16x16.png&amp;folder=pages\" alt=\"\u590d\u9009\u6807\u8bb0\"><\/td><td><\/td><td><\/td><\/tr><tr><td>\u4f7f\u7528\u6807\u51c6\u5217\u8868 \u63a7\u5236\u5668<\/td><td><\/td><td><\/td><td><\/td><td><img decoding=\"async\" src=\"https:\/\/developer.salesforce.com\/docs\/resources\/img\/en-us\/246.0?doc_id=dev_guides%2Fimages%2Fcheckmark_16x16.png&amp;folder=pages\" alt=\"\u590d\u9009\u6807\u8bb0\"><\/td><\/tr><tr><td>\u4f7f\u7528\u81ea\u5b9a\u4e49 Apex \u63a7\u5236\u5668<\/td><td><img decoding=\"async\" src=\"https:\/\/developer.salesforce.com\/docs\/resources\/img\/en-us\/246.0?doc_id=dev_guides%2Fimages%2Fcheckmark_16x16.png&amp;folder=pages\" alt=\"\u590d\u9009\u6807\u8bb0\"><\/td><td><img decoding=\"async\" src=\"https:\/\/developer.salesforce.com\/docs\/resources\/img\/en-us\/246.0?doc_id=dev_guides%2Fimages%2Fcheckmark_16x16.png&amp;folder=pages\" alt=\"\u590d\u9009\u6807\u8bb0\"><\/td><td><img decoding=\"async\" src=\"https:\/\/developer.salesforce.com\/docs\/resources\/img\/en-us\/246.0?doc_id=dev_guides%2Fimages%2Fcheckmark_16x16.png&amp;folder=pages\" alt=\"\u590d\u9009\u6807\u8bb0\"><\/td><td><img decoding=\"async\" src=\"https:\/\/developer.salesforce.com\/docs\/resources\/img\/en-us\/246.0?doc_id=dev_guides%2Fimages%2Fcheckmark_16x16.png&amp;folder=pages\" alt=\"\u590d\u9009\u6807\u8bb0\"><\/td><\/tr><tr><td>\u63a5\u53d7\u91c7\u8bbf \u5730\u56fe<\/td><td><img decoding=\"async\" src=\"https:\/\/developer.salesforce.com\/docs\/resources\/img\/en-us\/246.0?doc_id=dev_guides%2Fimages%2Fcheckmark_16x16.png&amp;folder=pages\" alt=\"\u590d\u9009\u6807\u8bb0\"><\/td><td><img decoding=\"async\" src=\"https:\/\/developer.salesforce.com\/docs\/resources\/img\/en-us\/246.0?doc_id=dev_guides%2Fimages%2Fcheckmark_16x16.png&amp;folder=pages\" alt=\"\u590d\u9009\u6807\u8bb0\"><\/td><td><img decoding=\"async\" src=\"https:\/\/developer.salesforce.com\/docs\/resources\/img\/en-us\/246.0?doc_id=dev_guides%2Fimages%2Fcheckmark_16x16.png&amp;folder=pages\" alt=\"\u590d\u9009\u6807\u8bb0\"><\/td><td><img decoding=\"async\" src=\"https:\/\/developer.salesforce.com\/docs\/resources\/img\/en-us\/246.0?doc_id=dev_guides%2Fimages%2Fcheckmark_16x16.png&amp;folder=pages\" alt=\"\u590d\u9009\u6807\u8bb0\"><\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\"><a><\/a>\u8bbe\u7f6e\u4e0d\u5e26 \u63a7\u5236\u5668<\/h2>\n\n\n\n<p>\u6b64\u793a\u4f8b\u5c06&nbsp;myVariable&nbsp;\u8bbe\u7f6e\u4e3a\u9762\u8bd5\u5f00\u59cb\u65f6\u7684\u503c\u3002<kbd>01010101<\/kbd><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>&lt;apex:page&gt;\n    &lt;flow:interview name=\"flowname\"&gt;\n        &lt;apex:param name=\"myVariable\" value=\"01010101\"\/&gt;\n    &lt;\/flow:interview&gt;\n&lt;\/apex:page&gt;<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\"><a><\/a>\u4f7f\u7528\u6807\u51c6\u8bbe\u7f6e\u53d8\u91cf\u503c \u63a7\u5236\u5668<\/h2>\n\n\n\n<p>\u60a8\u53ef\u4ee5\u4f7f\u7528\u6807\u51c6 Visualforce \u63a7\u5236\u5668\u901a\u8fc7\u4ece\u8bb0\u5f55\u4f20\u5165\u6570\u636e\u6765\u8bbe\u7f6e\u53d8\u91cf\u3002\u6b64\u793a\u4f8b\u96c6 \u9762\u8bd5\u65f6&nbsp;myVariable&nbsp;\u5230 Visualforce \u8868\u8fbe\u5f0f\u7684\u521d\u59cb\u503c \u5f00\u59cb\u3002<samp>{!account}<\/samp><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>&lt;apex:page standardController=\"Account\" tabStyle=\"Account\"&gt;\n    &lt;flow:interview name=\"flowname\"&gt;\n        &lt;apex:param name=\"myVariable\" value=\"{!account}\"\/&gt;\n    &lt;\/flow:interview&gt;\n&lt;\/apex:page&gt;<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\"><a><\/a>\u8bbe\u7f6e\u8bb0\u5f55\u96c6\u5408\u53d8\u91cf\u503c \u4f7f\u7528\u6807\u51c6\u5217\u8868\u63a7\u5236\u5668<\/h2>\n\n\n\n<p>\u7531\u4e8e\u8bb0\u5f55\u96c6\u5408\u53d8\u91cf\u8868\u793a\u503c\u6570\u7ec4\uff0c\u56e0\u6b64\u5fc5\u987b\u4f7f\u7528 \u6807\u51c6\u5217\u8868\u63a7\u5236\u5668\u6216\u81ea\u5b9a\u4e49 Apex \u63a7\u5236\u5668\u3002\u6b64\u793a\u4f8b\u5c06&nbsp;myCollection&nbsp;\u8bbe\u7f6e\u4e3a\u9762\u8bd5\u5f00\u59cb\u65f6\u7684\u503c\u3002<samp>{!accounts}<\/samp><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>&lt;apex:page standardController=\"Account\" tabStyle=\"Account\" recordSetVar=\"accounts\"&gt;\n    &lt;flow:interview name=\"flowname\"&gt;\n        &lt;apex:param name=\"myCollection\" value=\"{!accounts}\"\/&gt;\n    &lt;\/flow:interview&gt;\n&lt;\/apex:page&gt;<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\"><a><\/a>\u4f7f\u7528\u81ea\u5b9a\u4e49 Apex \u8bbe\u7f6e\u53d8\u91cf\u503c \u63a7\u5236\u5668<\/h2>\n\n\n\n<p>\u8981\u5bf9 Visualforce \u9875\u9762\u8fdb\u884c\u6bd4\u6807\u51c6\u63a7\u5236\u5668\u5141\u8bb8\u7684\u66f4\u7cbe\u7ec6\u7684\u63a7\u5236\uff0c\u8bf7\u7f16\u5199 \u8bbe\u7f6e\u53d8\u91cf\u503c\u7684\u81ea\u5b9a\u4e49 Apex \u63a7\u5236\u5668\uff0c\u7136\u540e\u5f15\u7528\u8be5\u53d8\u91cf\u503c \u63a7\u5236\u5668\u3002\u6b64\u793a\u4f8b\u4f7f\u7528 Apex \u5c06&nbsp;myVariable&nbsp;\u8bbe\u7f6e\u4e3a\u7279\u5b9a\u5e10\u6237\u7684 ID\uff0c\u5f53 \u9762\u8bd5\u5f00\u59cb\u3002<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>public class MyCustomController {\n    public Account apexVar {get; set;}\n\n    public MyCustomController() {\n        apexVar = &#91;\n            SELECT Id, Name FROM Account\n            WHERE Name = 'Acme' LIMIT 1];\n    }\n}<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code>&lt;apex:page controller=\"MyCustomController\"&gt;\n    &lt;flow:interview name=\"flowname\"&gt;\n        &lt;apex:param name=\"myVariable\" value=\"{!apexVar}\"\/&gt;\n    &lt;\/flow:interview&gt;\n&lt;\/apex:page&gt;<\/code><\/pre>\n\n\n\n<p>\u6b64\u793a\u4f8b\u4f7f\u7528 Apex \u5c06\u8bb0\u5f55\u96c6\u5408\u53d8\u91cf&nbsp;myAccount&nbsp;\u8bbe\u7f6e\u4e3a Name \u4e3a \u7684\u6bcf\u6761\u8bb0\u5f55\u7684&nbsp;Id&nbsp;\u548c&nbsp;Name&nbsp;\u5b57\u6bb5\u503c\u3002<kbd>Acme<\/kbd><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>public class MyCustomController {\n    public Account&#91;] myAccount { \n        get {\n            return &#91; \n                SELECT Id, Name FROM account \n                WHERE Name = 'Acme'\n                ORDER BY Id\n            ] ;\n        }\n        set {\n            myAccount = value;\n        }\n    }\n    public MyCustomController () {\n    }\n}<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code>&lt;apex:page id=\"p\" controller=\"MyCustomController\"&gt;\n    &lt;flow:interview id=\"i\" name=\"flowname\"&gt;\n        &lt;apex:param name=\"accountColl\" value=\"{!myAccount}\"\/&gt;\n    &lt;\/flow:interview&gt;\n&lt;\/apex:page&gt;<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\"><a><\/a>\u5728\u9762\u8bd5\u4e2d\u8bbe\u7f6e\u53d8\u91cf\u503c \u5730\u56fe<\/h2>\n\n\n\n<p>\u6b64\u793a\u4f8b\u4f7f\u7528\u9762\u8bd5\u6620\u5c04\u5728\u9762\u8bd5\u5f00\u59cb\u65f6\u5c06&nbsp;accVar&nbsp;\u7684\u503c\u8bbe\u7f6e\u4e3a\u7279\u5b9a\u5ba2\u6237\u7684 Id\u3002<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>public class MyCustomController {\n    public Flow.Interview.TestFlow myflow { get; set; }\n\n     public MyCustomController() {\n        Map&lt;String, Object&gt; myMap = new Map&lt;String, Object&gt;();\n        myMap.put('accVar', &#91;SELECT Id FROM Account \n                             WHERE Name = 'Acme' LIMIT 1]);\n        myflow = new Flow.Interview.ModemTroubleShooting(myMap);\n    }\n}<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code>&lt;apex:page controller=\"MyCustomController\"&gt;\n    &lt;flow:interview name=\"flowname\" interview=\"{!myflow}\"\/&gt;\n&lt;\/apex:page&gt;<\/code><\/pre>\n\n\n\n<p>\u4e0b\u9762\u662f\u4e00\u4e2a\u7c7b\u4f3c\u7684\u793a\u4f8b\uff0c\u8be5\u793a\u4f8b\u5728\u9762\u8bd5\u5f00\u59cb\u65f6\u5c06&nbsp;accVar&nbsp;\u7684\u503c\u8bbe\u7f6e\u4e3a\u65b0\u5e10\u6237\u3002<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>public class MyCustomController {\n    public Flow.Interview.TestFlow myflow { get; set; }\n\n     public MyCustomController() {\n        Map&lt;String, List&lt;Object&gt;&gt; myMap = new Map&lt;String, List&lt;Object&gt;&gt;();\n        myMap.put('accVar', new Account(name = 'Acme'));\n        myflow = new Flow.Interview.ModemTroubleShooting(myMap);\n    }\n}<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code>&lt;apex:page controller=\"MyCustomController\"&gt;\n    &lt;flow:interview name=\"flowname\" interview=\"{!myflow}\"\/&gt;\n&lt;\/apex:page&gt;<\/code><\/pre>\n\n\n\n<p>\u6b64\u793a\u4f8b\u4f7f\u7528\u6620\u5c04\u5c06\u4e24\u4e2a\u503c\u6dfb\u52a0\u5230\u5b57\u7b26\u4e32\u96c6\u5408\u53d8\u91cf \uff08stringCollVar\uff09 \u548c\u4e24\u4e2a\u503c\u5230\u4e00\u4e2a\u6570\u5b57\u96c6\u5408 \u53d8\u91cf \uff08numberCollVar\uff09\u3002<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>public class MyCustomController {\n    public Flow.Interview.flowname MyInterview { get; set; }\n\n    public MyCustomController() {\n        String&#91;] value1 = new String&#91;]{'First', 'Second'};\n        Double&#91;] value2 = new Double&#91;]{999.123456789, 666.123456789};\n        Map&lt;String, Object&gt; myMap = new Map&lt;String, Object&gt;();\n        myMap.put('stringCollVar', value1);\n        myMap.put('numberCollVar', value2);\n        MyInterview = new Flow.Interview.flowname(myMap);\n    }\n}<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code>&lt;apex:page controller=\"MyCustomController\"&gt;\n    &lt;flow:interview name=\"flowname\" interview=\"{!MyInterview}\" \/&gt;\n&lt;\/apex:page&gt;<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\">\u5c06\u6d41\u53d8\u91cf\u503c\u83b7\u53d6\u5230 Visualforce \u9875\u9762<\/h2>\n\n\n\n<p>\u6d41\u53d8\u91cf\u503c\u53ef\u4ee5\u663e\u793a\u5728 Visualforce \u9875\u9762\u4e2d\u3002\u4e00\u65e6\u4f60 \u5c06\u60a8\u7684\u6d41\u7a0b\u5d4c\u5165\u5230 Visualforce \u9875\u9762\u4e2d\uff0c\u60a8\u53ef\u4ee5\u4f7f\u7528 Visualforce \u6807\u8bb0 \u83b7\u53d6\u53d8\u91cf\u7684\u503c\u6216\u8bb0\u5f55\u53d8\u91cf\u3002\u663e\u793a\u96c6\u5408\u7684\u503c \u53d8\u91cf\u6216\u8bb0\u5f55\u96c6\u5408\u53d8\u91cf\uff0c\u60a8\u53ef\u4ee5\u4f7f\u7528 Visualforce \u6807\u8bb0\u6765\u83b7\u53d6 \u96c6\u5408\u4e2d\u5305\u542b\u7684\u5355\u4e2a\u503c\u3002<\/p>\n\n\n\n<p>\u6ce8\u610f<\/p>\n\n\n\n<p>\u4f60 \u53ea\u80fd\u83b7\u53d6\u5141\u8bb8\u8f93\u51fa\u8bbf\u95ee\u7684\u53d8\u91cf\u3002\u5982\u679c\u5f15\u7528\u4e0d\u5141\u8bb8\u8f93\u51fa\u8bbf\u95ee\u7684\u53d8\u91cf\uff0c \u83b7\u53d6\u53d8\u91cf\u7684\u5c1d\u8bd5\u5c06\u88ab\u5ffd\u7565\u3002Visualforce \u9875\u9762\u3001\u5176\u7ec4\u4ef6\u6216 \u9876\u70b9\u7c7b\u3002<samp>&lt;apex:page&gt;<\/samp>\u4e0b\u9762\u7684\u793a\u4f8b\u4f7f\u7528 Apex \u7c7b\u4ece flow\uff0c\u7136\u540e\u5728 Visualforce \u4e2d\u663e\u793a\u5b83 \u9875\u3002<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>public class FlowController {\n    public Flow.Interview.flowname myflow { get; set; }\n    public Case apexCaseVar;\n    public Case getApexCaseVar() {\n        return myflow.caseVar;\n    }\n}<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code>&lt;apex:page controller=\"FlowController\" tabStyle=\"Case\"&gt;\n    &lt;flow:interview name=\"flowname\" interview=\"{!myflow}\"\/&gt;\n    &lt;apex:outputText value=\"Default Case Priority: {!apexCaseVar.Priority}\"\/&gt;\n&lt;\/apex:page&gt;<\/code><\/pre>\n\n\n\n<p>\u8fd9 \u793a\u4f8b\u4f7f\u7528 Apex \u7c7b\u83b7\u53d6\u5b58\u50a8\u5728\u5b57\u7b26\u4e32\u96c6\u5408\u4e2d\u7684\u503c \u53d8\u91cf \uff08emailsCollVar\uff09\u3002\u7136\u540e\uff0c\u5b83\u4f7f\u7528 Visualforce \u9875\u9762\u8fd0\u884c \u6d41\u7a0b\u9762\u8bd5\u3002Visualforce \u9875\u9762\u5c06\u5faa\u73af\u8bbf\u95ee\u6d41\u7a0b\u7684\u96c6\u5408\u53d8\u91cf\uff0c\u5e76\u663e\u793a \u4e2d\u7684\u6bcf\u4e00\u9879 \u6536\u96c6\u3002<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>public class FlowController {\n    public Flow.Interview.flowname myflow { get; set; }\n\n    public List&lt;String&gt; getVarValue() {\n        if (myflow == null) { \n            return null; \n        }\n        else {\n            return (List&lt;String&gt;)myflow.emailsCollVar;\n        }\n    }\n}<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code>&lt;apex:page controller=\"FlowController\"&gt;\n    &lt;flow:interview name=\"flowname\" interview=\"{!myflow}\" \/&gt;\n        &lt;apex:repeat value=\"{!varValue}\" var=\"item\"&gt;\n        &lt;apex:outputText value=\"{!item}\"\/&gt;&lt;br\/&gt;\n        &lt;\/apex:repeat&gt;\n&lt;\/apex:page&gt;<\/code><\/pre>\n\n\n\n<p>\u8fd9 \u4ee5\u4e0b\u793a\u4f8b\u4f7f\u7528 Apex \u7c7b\u5c06\u6d41\u7a0b\u8bbe\u7f6e\u4e3a\uff0c\u7136\u540e\u4f7f\u7528 Visualforce \u9875\u9762\u8fd0\u884c \u6d41\u7a0b\u9762\u8bd5\u3002Visualforce \u9875\u9762\u4f7f\u7528\u6570\u636e\u8868\u5faa\u73af\u8bbf\u95ee\u6d41\u7a0b\u7684\u8bb0\u5f55\u96c6\u5408 \u53d8\u91cf\uff0c\u5e76\u663e\u793a \u6536\u96c6\u3002<samp>{!myflow}<\/samp><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>public class MyCustomController {\n   public Flow.Interview.flowname myflow { get; set; }\n}<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code>&lt;apex:page controller=\"MyCustomController\" tabStyle=\"Account\"&gt;\n   &lt;flow:interview name=\"flowname\" interview=\"{!myflow}\" reRender=\"nameSection\" \/&gt;\n    &lt;!-- The data table iterates over the variable set in the \"value\" attribute and \n         sets that variable to the value for the \"var\" attribute, so that instead of \n         referencing {!myflow.collectionVariable} in each column, you can simply refer \n         to \"account\".--&gt;\n    &lt;apex:dataTable value=\"{!myflow.collectionVariable}\" var=\"account\" \n        rowClasses=\"odd,even\" border=\"1\" cellpadding=\"4\" id=\"nameSection\"&gt;\n        &lt;!-- Add a column for each value that you want to display.--&gt;\n        &lt;apex:column &gt;\n            &lt;apex:facet name=\"header\"&gt;Name&lt;\/apex:facet&gt;\n            &lt;apex:outputlink value=\"\/{!account&#91;'Id']}\"&gt;\n                {!account&#91;'Name']}\n            &lt;\/apex:outputlink&gt;\n        &lt;\/apex:column&gt;\n        &lt;apex:column &gt;\n            &lt;apex:facet name=\"header\"&gt;Rating&lt;\/apex:facet&gt;\n            &lt;apex:outputText value=\"{!account&#91;'Rating']}\"\/&gt;\n        &lt;\/apex:column&gt;\n        &lt;apex:column &gt;\n            &lt;apex:facet name=\"header\"&gt;Billing City&lt;\/apex:facet&gt;\n            &lt;apex:outputText value=\"{!account&#91;'BillingCity']}\"\/&gt;\n        &lt;\/apex:column&gt;\n        &lt;apex:column &gt;\n            &lt;apex:facet name=\"header\"&gt;Employees&lt;\/apex:facet&gt;\n            &lt;apex:outputText value=\"{!account&#91;'NumberOfEmployees']}\"\/&gt;\n        &lt;\/apex:column&gt;\n    &lt;\/apex:dataTable&gt;\n&lt;\/apex:page&gt;<\/code><\/pre>\n\n\n\n<p>\u53d6\u51b3\u4e8e \u5728\u6d41\u4e2d\u8bb0\u5f55\u96c6\u5408\u53d8\u91cf\u7684\u5185\u5bb9\u4e0a\uff0c\u5185\u5bb9\u5982\u4e0b \u8be5\u6570\u636e\u8868\u5982\u4e0b\u6240\u793a\u3002<img decoding=\"async\" src=\"https:\/\/developer.salesforce.com\/docs\/resources\/img\/en-us\/246.0?doc_id=dev_guides%2Fpages%2Fimages%2Fflow_display_collection.png&amp;folder=pages\" alt=\"Example of a data table that displays the contents of a record collection variable\"><\/p>\n\n\n\n<h2 class=\"wp-block-heading\">\u63a7\u5236\u7528\u6237\u662f\u5426\u53ef\u4ee5\u6682\u505c\u6765\u81ea Visualforce \u7684\u6d41\u7a0b \u9875<\/h2>\n\n\n\n<p>\u4f7f\u7528\u7ec4\u4ef6\u5728 Visualforce \u9875\u9762\u4e2d\u5d4c\u5165\u6d41\u7a0b\u540e\uff0c\u8bf7\u8003\u8651\u662f\u5426\u8981\u8ba9\u7528\u6237\u6682\u505c\u6d41\u7a0b \u90a3\u4e00\u9875\u3002\u5c06\u5c5e\u6027\u8bbe\u7f6e\u4e3a false \u963b\u6b62\u7528\u6237\u6682\u505c\u3002<\/p>\n\n\n\n<p><samp>&lt;flow:interview&gt;<\/samp><samp>allowShowPause<\/samp>\u662f\u5426\u663e\u793a<strong>\u201c\u6682\u505c<\/strong>\u201d\u6309\u94ae\u53d6\u51b3\u4e8e\u4e09\u4e2a\u8bbe\u7f6e\u3002<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>\u7ec4\u7ec7\u7684\u6d41\u7a0b\u81ea\u52a8\u5316\u8bbe\u7f6e\u5fc5\u987b\u542f\u7528\u5141\u8bb8\u7528\u6237\u6682\u505c\u6d41\u7a0b\u3002<\/li>\n\n\n\n<li>\u4e3a\u6b64\uff0c\u4e0d\u80fd\u662f\u5047\u7684\u3002\u9ed8\u8ba4\u503c\u4e3a \u771f\u3002<samp>&lt;flow:interview&gt;<\/samp><samp>allowShowPause<\/samp><\/li>\n\n\n\n<li>\u6bcf\u4e2a\u5c4f\u5e55\u90fd\u5fc5\u987b\u914d\u7f6e\u4e3a\u663e\u793a<strong>\u201c\u6682\u505c<\/strong>\u201d\u6309\u94ae\u3002<\/li>\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\">\u4f8b<\/h2>\n\n\n\n<p>\u5728 Visualforce \u9875\u9762\u4e2d\uff0c\u60a8\u5d4c\u5165\u4e86\u4e00\u4e2a\u5305\u542b\u4e09\u4e2a\u5c4f\u5e55\u7684\u6d41\u7a0b\u3002\u5c4f\u5e55 1 \u662f \u914d\u7f6e\u4e3a\u663e\u793a<strong>\u201c\u6682\u505c<\/strong>\u201d\u6309\u94ae\u3002\u5c4f\u5e55 2 \u548c 3 \u914d\u7f6e\u4e3a \u4e0d\u663e\u793a<strong>\u201c\u6682\u505c<\/strong>\u201d\u6309\u94ae\u3002<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table><thead><tr><th>\u5141\u8bb8\u7528\u6237\u6682\u505c\u6d41\uff08\u8fc7\u7a0b\u81ea\u52a8\u5316\u8bbe\u7f6e\uff09<\/th><th><samp>allowShowPause<\/samp>\uff08\u89c6\u89c9\u529b \u7ec4\u4ef6\uff09<\/th><th>\u7ed3\u679c\u6682\u505c\u6309\u94ae<\/th><\/tr><\/thead><tbody><tr><td>\u542f\u7528<\/td><td><samp>true<\/samp>\u6216\u672a\u8bbe\u7f6e<\/td><td>\u6682\u505c\u6309\u94ae\u4ec5\u51fa\u73b0\u5728\u7b2c\u4e00\u4e2a\u5c4f\u5e55\u4e0a<\/td><\/tr><tr><td>\u542f\u7528<\/td><td><samp>false<\/samp><\/td><td>\u6b64 Visualforce \u9875\u9762\u4e2d\u7684\u4efb\u4f55\u5c4f\u5e55\u5747\u672a\u663e\u793a\u6682\u505c\u6309\u94ae<\/td><\/tr><tr><td>\u672a\u542f\u7528<\/td><td><samp>true<\/samp>\u6216\u672a\u8bbe\u7f6e<\/td><td>\u6682\u505c\u6309\u94ae\u4e0d\u4f1a\u51fa\u73b0\u5728\u4efb\u4f55\u5c4f\u5e55\u4e0a<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<p>\u6b64\u793a\u4f8b\u5c06 MyUniqueFlow \u6d41\u5d4c\u5165\u5230 Visualforce \u9875\u9762\u4e2d\uff0c\u5e76\u4e14\u4e0d\u5141\u8bb8<strong>\u201c\u6682\u505c<\/strong>\u201d\u6309\u94ae \u51fa\u73b0\u3002<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>&lt;apex:page&gt;   \n   &lt;flow:interview name=\"MyUniqueFlow\" allowShowPause=\"false\" \/&gt;\n&lt;\/apex:page&gt;<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\">\u81ea\u5b9a\u4e49\u7528\u6237\u6062\u590d\u6682\u505c\u6d41\u7a0b\u8bbf\u8c08\u7684\u65b9\u5f0f<\/h2>\n\n\n\n<p>\u9ed8\u8ba4\u60c5\u51b5\u4e0b\uff0c\u7528\u6237\u53ef\u4ee5\u4ece\u201c\u6682\u505c\u7684\u9762\u8bd5\u201d\u4e2d\u6062\u590d\u6682\u505c\u7684\u9762\u8bd5 \u7ec4\u4ef6\u3002\u5982\u679c\u8981\u81ea\u5b9a\u4e49\u7528\u6237\u6062\u590d\u5176\u6062\u590d\u7684\u65b9\u5f0f\u548c\u4f4d\u7f6e interviews\uff0c\u8bf7\u4f7f\u7528\u7ec4\u4ef6\u4e0a\u7684\u5c5e\u6027\u3002<\/p>\n\n\n\n<p><samp>pausedInterviewId<\/samp><samp>&lt;flow:interview&gt;<\/samp>\u4ee5\u4e0b\u793a\u4f8b\u663e\u793a\u4e86\u5982\u4f55\u6062\u590d\u9762\u8bd5\u6216\u5f00\u59cb\u65b0\u7684\u9762\u8bd5 \u4e00\u4e2a &#8211; \u4ece\u9875\u9762\u5e03\u5c40\u4e0a\u7684\u6309\u94ae\u3002\u5f53\u7528\u6237\u5355\u51fb<strong>\u201c\u8c03\u67e5\u201d\u65f6 \u5ba2\u6237<\/strong>\u4ece\u8054\u7cfb\u4eba\u8bb0\u5f55\u4e2d\uff0cVisualforce \u9875\u9762\u6267\u884c\u4ee5\u4e0b\u4e24\u9879\u64cd\u4f5c\u4e4b\u4e00\uff1a \u53d6\u51b3\u4e8e\u7528\u6237\u662f\u5426\u5bf9\u201c\u8c03\u67e5\u5ba2\u6237\u201d\u6d41\u7a0b\u8fdb\u884c\u4e86\u4efb\u4f55\u6682\u505c\u7684\u8bbf\u8c08\u3002<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>\u5982\u679c\u7528\u6237\u8fd9\u6837\u505a\uff0c\u5b83\u5c06\u6062\u590d\u7b2c\u4e00\u4e2a\u3002<\/li>\n\n\n\n<li>\u5982\u679c\u7528\u6237\u4e0d\u8fd9\u6837\u505a\uff0c\u5b83\u4f1a\u542f\u52a8\u4e00\u4e2a\u65b0\u7684\u3002<\/li>\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\">\u521b\u5efa Visualforce \u548c Apex \u63a7\u5236\u5668<\/h2>\n\n\n\n<p>\u56e0\u4e3a Visualforce \u9875\u9762\u5c06\u662f \u5728\u7279\u5b9a\u4e8e\u8054\u7cfb\u4eba\u7684\u6309\u94ae\u4e2d\u5f15\u7528\uff0c\u5b83\u5fc5\u987b\u4f7f\u7528\u8be5\u6807\u51c6\u63a7\u5236\u5668\u3002\u4f7f\u7528 \u63a7\u5236\u5668\u6269\u5c55\uff0c\u4ee5\u4f7f\u7528 Apex \u5411\u9875\u9762\u6dfb\u52a0\u66f4\u591a\u903b\u8f91\uff0c\u8fd9\u662f\u9875\u9762\u83b7\u53d6\u7684\u4f4d\u7f6e \u8981\u6062\u590d\u7684\u9762\u8bd5\u7684 ID\u3002<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>&lt;apex:page\n   standardController=\"Contact\" extensions=\"MyControllerExtension_SurveyCustomers\"&gt;\n   &lt;flow:interview name=\"Survey_Customers\" pausedInterviewId=\"{!pausedId}\"\/&gt;\n&lt;\/apex:page&gt;<\/code><\/pre>\n\n\n\n<p>\u6b64 Apex \u63a7\u5236\u5668\u6269\u5c55\u6267\u884c SOQL \u67e5\u8be2\u4ee5\u83b7\u53d6\u6682\u505c\u8bbf\u8c08\u7684\u5217\u8868\u3002\u5982\u679c \u67e5\u8be2\u4e2d\u4e0d\u8fd4\u56de\u4efb\u4f55\u5185\u5bb9\uff0c\u8fd4\u56de null \u503c\uff0c\u5e76\u4e14 Visualforce \u9875\u9762\u5c06\u5f00\u59cb\u65b0\u7684\u9762\u8bd5\u3002\u5982\u679c\u81f3\u5c11\u4e00\u4e2a interview \u4ece\u67e5\u8be2\u4e2d\u8fd4\u56de\uff0c\u5219 Visualforce \u9875\u9762\u5c06\u6062\u590d \u90a3\u4e2a\u5217\u8868\u3002<samp>getPausedId()<\/samp><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>public class MyControllerExtension_SurveyCustomers {\n    \n    \/\/ Empty constructor, to allow use as a controller extension\n    public MyControllerExtension_SurveyCustomers(\n        ApexPages.StandardController stdController) { }\n    \n    \/\/ Flow support methods\n    public String getInterviews() { return null; }\n    \n    public String showList { get; set; }\n    \n    public String getPausedId() {\n        String currentUser = UserInfo.getUserId();\n        List&lt;FlowInterview&gt; interviews = \n            &#91;SELECT Id FROM FlowInterview WHERE CreatedById = :currentUser AND InterviewLabel LIKE '%Survey Customers%'];\n\n        if (interviews == null || interviews.isEmpty()) {\n            return null; \/\/ early out\n        }\n        \n        \/\/ Return the ID for the first interview in the list\n        return interviews.get(0).Id;\n    }\n}<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\">\u53c2\u8003 Visualforce \u9875\u9762 \u4ece\u9875\u9762\u5e03\u5c40<\/h2>\n\n\n\n<p>\u4e3a\u4e86\u5b9e\u9645\u66b4\u9732\u8fd9\u4e2a Visualforce \u9875\u9762\uff0c\u4f7f\u5176\u53ef\u4ece\u201c\u8054\u7cfb\u4eba\u201d\u9875\u9762\u5e03\u5c40\u4e2d\u4f7f\u7528\u3002<\/p>\n\n\n\n<p>\u63d0\u793a<\/p>\n\n\n\n<p>\u5982\u679c\u5c06 Visualforce \u9875\u9762\u76f4\u63a5\u5d4c\u5165\u5230\u9875\u9762\u4e2d \u5e03\u5c40\u4e2d\uff0c\u6bcf\u6b21\u7528\u6237\u8bbf\u95ee\u8054\u7cfb\u4eba\u65f6\uff0c\u4ed6\u4eec\u90fd\u4f1a\u81ea\u52a8\u6062\u590d\u4ed6\u4eec\u7684\u7b2c\u4e00\u4e2a\u8054\u7cfb\u4eba \u6682\u505c\u91c7\u8bbf\u2014\u2014\u53ef\u80fd\u662f\u65e0\u610f\u7684\u3002\u7528\u6237\u6700\u597d\u5c06 \u6709\u610f\u8bc6\u5730\u9009\u62e9\u5f00\u59cb\u6216\u6062\u590d\u9762\u8bd5\uff0c\u6240\u4ee5\u8ba9\u6211\u4eec\u4f7f\u7528\u81ea\u5b9a\u4e49\u6309\u94ae\u3002\u9996\u5148\uff0c\u4e3a\u94fe\u63a5\u5230 Visualforce \u9875\u9762\u7684 Contact \u5bf9\u8c61\u521b\u5efa\u4e00\u4e2a\u81ea\u5b9a\u4e49\u6309\u94ae\u3002\u4f7f\u7528\u8fd9\u4e9b\u5b57\u6bb5 \u503c\u6765\u521b\u5efa\u6309\u94ae\u3002<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table><thead><tr><th>\u7530<\/th><th>\u4ef7\u503c<\/th><\/tr><\/thead><tbody><tr><td>\u6807\u7b7e<\/td><td>\u8c03\u67e5\u5ba2\u6237<\/td><\/tr><tr><td>\u663e\u793a\u7c7b\u578b<\/td><td>\u201c\u8be6\u60c5\u9875\u9762\u201d\u6309\u94ae<\/td><\/tr><tr><td>\u5185\u5bb9\u6e90<\/td><td>Visualforce \u9875\u9762<\/td><\/tr><tr><td>\u5185\u5bb9<\/td><td><var>YourVisualforcePage<\/var><\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<p>\u6700\u540e\uff0c\u5c06\u6309\u94ae\u6dfb\u52a0\u5230\u201c\u8054\u7cfb\u4eba\u201d\u9875\u9762\u5e03\u5c40\u4e2d\u3002<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">\u5728\u6d41\u4e2d\u914d\u7f6e&nbsp;finishLocation&nbsp;\u5c5e\u6027<\/h2>\n\n\n\n<p>\u5982\u679c\u672a\u6307\u5b9a\uff0c\u5219\u7528\u6237 \u8c01\u5355\u51fb<strong>\u5b8c\u6210<\/strong>\u5f00\u59cb\u65b0\u7684\u9762\u8bd5\u5e76\u770b\u5230 \u6d41\u3002\u60a8\u53ef\u4ee5\u786e\u5b9a\u5f53\u7528\u6237\u5728\u6700\u7ec8\u9636\u6bb5\u5355\u51fb<strong>\u201c\u5b8c\u6210<\/strong>\u201d\u65f6\u4f1a\u53d1\u751f\u4ec0\u4e48\u60c5\u51b5 \u4f7f\u7528\u51fd\u6570\u3001\u53d8\u91cf\u6216\u63a7\u5236\u5668\u8fdb\u884c\u7b5b\u9009\u3002<\/p>\n\n\n\n<p><samp>finishLocation<\/samp><samp>URLFOR<\/samp><samp>$Page<\/samp>\u4ee5\u4e0b\u5404\u8282\u663e\u793a\u4e86\u914d\u7f6e\u7ec4\u4ef6\u5c5e\u6027\u7684\u65b9\u6cd5\u3002<\/p>\n\n\n\n<p><samp>&lt;flow:interview&gt;<\/samp><samp>finishLocation<\/samp><\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>\u4f7f\u7528\u00a0<samp>URLFOR<\/samp>\u00a0\u51fd\u6570\u8bbe\u7f6e\u00a0<samp>finishLocation<\/samp><\/li>\n\n\n\n<li>\u4f7f\u7528\u00a0<samp>$Page<\/samp>\u00a0\u53d8\u91cf\u8bbe\u7f6e\u00a0<samp>finishLocation<\/samp><\/li>\n\n\n\n<li>\u4f7f\u7528 Controller \u8bbe\u7f6e\u00a0<samp>finishLocation<\/samp><\/li>\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\"><a><\/a>\u4f7f\u7528&nbsp;URLFOR&nbsp;\u51fd\u6570\u8bbe\u7f6e&nbsp;finishLocation<\/h2>\n\n\n\n<p>\u6ce8\u610f<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>\u60a8\u65e0\u6cd5\u5c06\u6d41\u7528\u6237\u91cd\u5b9a\u5411\u5230\u7b26\u5408\u4ee5\u4e0b\u6761\u4ef6\u7684 URL Salesforce \u7ec4\u7ec7\u5916\u90e8\u3002<\/li>\n\n\n\n<li>\u4e0d\u8981\u5728\u540c\u4e00\u6d41\u4e2d\u8c03\u7528\u65b9\u6cd5\u548c\u5c5e\u6027\u3002 \u8868\u793a Visualforce \u9875\u9762\u767b\u5f55\u6d41\u7a0b\u7ed3\u675f\u3002\u5982\u679c\u5728\u540c\u4e00\u6d41\u4e2d\uff0c\u5219\u5728\u6d41\u4e2d\u6267\u884c \u542f\u52a8\uff0c\u4e3a\u7528\u6237\u63d0\u4f9b\u5bf9\u4f1a\u8bdd\u7684\u5b8c\u5168\u8bbf\u95ee\u6743\u9650\u3002<samp>Auth.SessionManagement.finishLoginFlow<\/samp><samp>finishLocation<\/samp><samp>Auth.SessionManagement.finishLoginFlow<\/samp><samp>finishLocation<\/samp><samp>finishLocation<\/samp><\/li>\n<\/ul>\n\n\n\n<p>\u5c06\u7528\u6237\u8def\u7531\u5230 \u76f8\u5bf9 URL \u6216\u7279\u5b9a\u8bb0\u5f55\u6216\u8be6\u7ec6\u4fe1\u606f\u9875\u9762\uff0c\u4f7f\u7528\u5176 ID \u4f7f\u7528\u8be5\u51fd\u6570\u3002<samp>URLFOR<\/samp>\u6b64\u793a\u4f8b\u5c06\u7528\u6237\u8def\u7531\u5230 Salesforce \u4e3b\u9875 \u9875\u3002<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>&lt;apex:page&gt;\n    &lt;flow:interview name=\"MyUniqueFlow\" finishLocation=\"{!URLFOR('\/home\/home.jsp')}\"\/&gt;\n&lt;\/apex:page&gt;<\/code><\/pre>\n\n\n\n<p>\u6b64\u793a\u4f8b\u5c06\u7528\u6237\u5f15\u5bfc\u81f3\u8be6\u7ec6\u4fe1\u606f\u9875\u9762 ID \u4e3a 001D000000IpE9X\u3002<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>&lt;apex:page&gt;\n    &lt;flow:interview name=\"MyUniqueFlow\" finishLocation=\"{!URLFOR('\/001D000000IpE9X')}\"\/&gt;\n&lt;\/apex:page&gt;<\/code><\/pre>\n\n\n\n<p>\u6709\u5173 \u7684\u8be6\u7ec6\u4fe1\u606f\uff0c\u8bf7\u53c2\u9605\u51fd\u6570\u3002<samp>URLFOR<\/samp><\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><a><\/a>\u4f7f\u7528&nbsp;$Page&nbsp;\u53d8\u91cf\u8bbe\u7f6e&nbsp;finishLocation<\/h2>\n\n\n\n<p>\u8981\u5728\u4e0d\u4f7f\u7528 \u7684\u60c5\u51b5\u4e0b\u5c06\u7528\u6237\u8def\u7531\u5230\u53e6\u4e00\u4e2a Visualforce \u9875\u9762\uff0c\u8bf7\u8bbe\u7f6e\u4e3a\u76ee\u6807\u7684\u540d\u79f0 \u9875\u9762\u7684\u683c\u5f0f\u4e3a .<\/p>\n\n\n\n<p><samp>URLFOR<\/samp><samp>finishLocation<\/samp><samp>{!$Page.pageName}<\/samp><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>&lt;apex:page&gt;\n    &lt;flow:interview name=\"MyUniqueFlow\" finishLocation=\"{!$Page.MyUniquePage}\"\/&gt;\n&lt;\/apex:page&gt;<\/code><\/pre>\n\n\n\n<p>\u6709\u5173 \u7684\u8be6\u7ec6\u4fe1\u606f\uff0c\u8bf7\u53c2\u9605\u5168\u5c40\u53d8\u91cf\u3002<samp>$Page<\/samp><\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><a><\/a>\u4f7f\u7528 Controller \u8bbe\u7f6e&nbsp;finishLocation<\/h2>\n\n\n\n<p>\u60a8\u53ef\u4ee5\u4f7f\u7528\u81ea\u5b9a\u4e49\u63a7\u5236\u5668\u901a\u8fc7\u591a\u79cd\u65b9\u5f0f\u8fdb\u884c\u8bbe\u7f6e\u3002<samp>finishLocation<\/samp>\u6b64\u793a\u4f8b\u63a7\u5236\u5668\u914d\u7f6e\u4e86\u4e00\u4e2a \u6d41\u52a8\u7684\u5b8c\u6210\u884c\u4e3a\u5728\u4e09\u79cd\u4e0d\u540c\u7684 \u65b9\u5f0f\u3002<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>public class myFlowController {\n    \n    public PageReference getPageA() {\n        return new PageReference('\/300');\n    }\n    \n    public String getPageB() {\n        return '\/300';\n    }\n    \n    public String getPageC() {\n        return '\/apex\/my_finish_page';\n    }\n}<\/code><\/pre>\n\n\n\n<p>\u4e0b\u9762\u662f\u4e00\u4e2a Visualforce \u793a\u4f8b \u5f15\u7528\u63a7\u5236\u5668\u5e76\u5c06\u6d41\u5b8c\u6210\u884c\u4e3a\u8bbe\u7f6e\u4e3a\u7b2c\u4e00\u4e2a\u7684\u9875\u9762 \u9009\u62e9\u3002<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>&lt;apex:page controller=\"myFlowController\"&gt;\n    &lt;h1&gt;Congratulations!&lt;\/h1&gt; This is your new page.\n    &lt;flow:interview name=\"flowname\" finishLocation=\"{!pageA}\"\/&gt;\n&lt;\/apex:page&gt;<\/code><\/pre>\n\n\n\n<p>\u5982\u679c\u4f7f\u7528\u6807\u51c6\u63a7\u5236\u5668\u663e\u793a \u5728\u4e0e\u6d41\u7a0b\u76f8\u540c\u7684\u9875\u9762\u4e0a\u8fdb\u884c\u8bb0\u5f55\uff0c\u5355\u51fb<strong>\u201c\u5b8c\u6210<\/strong>\u201d\u7684\u7528\u6237\u5c06\u5f00\u59cb\u65b0\u7684\u6d41\u7a0b\u8bbf\u8c08\u3002\u4ed6\u4eec\u770b\u5230\u6d41\u7684\u7b2c\u4e00\u4e2a\u5c4f\u5e55\uff0c\u4f46\u6ca1\u6709 \u8bb0\u5f55\uff0c\u56e0\u4e3a\u67e5\u8be2\u5b57\u7b26\u4e32 \u53c2\u6570\u4e0d\u4f1a\u4fdd\u7559\u5728\u9875\u9762 URL \u4e2d\u3002\u5982\u679c\u9700\u8981\uff0c\u8bf7\u914d\u7f6e \u5c06\u7528\u6237\u8def\u7531\u56de \u8bb0\u5f55\u3002<samp>id<\/samp><samp>finishLocation<\/samp><\/p>\n\n\n\n<h2 class=\"wp-block-heading\">\u81ea\u5b9a\u4e49\u6d41\u7684\u7528\u6237\u754c\u9762<\/h2>\n\n\n\n<p>\u5728 Visualforce \u9875\u9762\u4e2d\u5d4c\u5165\u6d41\u7a0b\u540e\uff0c\u60a8\u53ef\u4ee5\u901a\u8fc7\u5e94\u7528 \u4f7f\u7528 CSS \u7684\u81ea\u5b9a\u4e49\u6837\u5f0f\u3002\u7ed3\u5408\u4f7f\u7528\u6d41\u5c5e\u6027\u548c CSS \u7c7b\uff0c\u60a8\u53ef\u4ee5\u81ea\u5b9a\u4e49\u6d41\u7a0b\u7684\u5404\u4e2a\u90e8\u5206\uff0c\u4f8b\u5982 \u4f5c\u4e3a\u6309\u94ae\u4f4d\u7f6e\u3001\u6309\u94ae\u6837\u5f0f\u3001\u80cc\u666f\u4ee5\u53ca\u5916\u89c2\u548c \u5c4f\u5e55\u6807\u7b7e\u7684\u611f\u89c9\u3002<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Flow \u6309\u94ae\u5c5e\u6027<\/h2>\n\n\n\n<p>\u4f7f\u7528\u8fd9\u4e9b\u5c5e\u6027\u53ef\u4ee5\u66f4\u6539<strong>\u201c\u4e0b\u4e00\u6b65<\/strong>\u201d\u3001\u201c<strong>\u4e0a\u4e00\u4e2a<\/strong>\u201d\u3001\u201c<strong>\u5b8c\u6210<\/strong>\u201d\u3001\u201c\u6682\u505c\u201d\u548c<strong><\/strong><strong>\u201c\u4e0d\u6682\u505c<\/strong>\u201d\u6309\u94ae\u5728 \u4f60\u7684\u6d41\u7a0b\u3002<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table><thead><tr><th>\u5c5e\u6027<\/th><th>\u63cf\u8ff0<\/th><\/tr><\/thead><tbody><tr><td><samp>buttonLocation<\/samp><\/td><td>\u5b9a\u4e49\u5bfc\u822a\u6309\u94ae\u5728\u6d41\u4e2d\u7684\u4f4d\u7f6e \u7528\u6237\u754c\u9762\u3002\u53ef\u7528\u503c\u4e3a\uff1a<samp>top<\/samp><samp>bottom<\/samp><samp>both<\/samp>\u4f8b\u5982\uff1a<code>&lt;apex:page&gt; &lt;flow:interview name=\"MyFlow\" buttonLocation=\"bottom\"\/&gt; &lt;\/apex:page&gt;<\/code>\u6ce8\u610f\u5982\u679c\u672a\u6307\u5b9a\uff0c\u5219\u8be5\u503c\u9ed8\u8ba4\u4e3a \u3002<samp>buttonLocation<\/samp><samp>both<\/samp><\/td><\/tr><tr><td><samp>buttonStyle<\/samp><\/td><td>\u5c06\u6837\u5f0f\u4f5c\u4e3a\u4e00\u7ec4\u5206\u914d\u7ed9\u6d41\u5bfc\u822a\u6309\u94ae\u3002\u80fd \u4ec5\u7528\u4e8e\u5185\u8054\u6837\u5f0f\uff0c\u4e0d\u7528\u4e8e CSS \u7c7b\u3002\u4f8b\u5982\uff1a<code>&lt;apex:page&gt; &lt;flow:interview name=\"MyFlow\" buttonStyle=\"color:#050; background-color:#fed; border:1px solid;\"\/&gt; &lt;\/apex:page&gt;<\/code><\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\"><a><\/a>\u7279\u5b9a\u4e8e\u6d41\u7684 CSS \u7c7b<\/h2>\n\n\n\n<p>\u60a8\u53ef\u4ee5\u8986\u76d6\u8fd9\u4e9b\u9884\u5b9a\u4e49\u7684\u6d41\u6837\u5f0f \u5177\u6709\u60a8\u81ea\u5df1\u7684 CSS \u6837\u5f0f\u7684\u7c7b\u3002<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table><thead><tr><th>Flow Style \u7c7b<\/th><th>\u9002\u7528\u4e8e&#8230;<\/th><\/tr><\/thead><tbody><tr><td>FlowContainer\uff08\u6d41\u7a0b\u5bb9\u5668\uff09<\/td><td>\u5305\u542b \u6d41\u3002<samp>&lt;div&gt;<\/samp><\/td><\/tr><tr><td>FlowPageBlockBtns\uff08\u6d41\u9875\u5757Btns\uff09<\/td><td>\u5143\u7d20 \u5305\u542b\u6d41\u5bfc\u822a\u6309\u94ae\u3002<samp>&lt;apex:pageBlockButtons&gt;<\/samp>\u6ce8\u610f\u9632\u6b62\u6d41\u7684 CSS \u6837\u5f0f \u5bfc\u822a\u6309\u94ae\u4e0d\u88ab\u5176\u4ed6\u4f4d\u7f6e\u5e94\u7528\u7684\u6309\u94ae\u6837\u5f0f\u8986\u76d6 \u7cfb\u7edf\u4e2d\uff0c\u6211\u4eec\u5efa\u8bae\u60a8\u5728\u6bcf\u6b21\u5e94\u7528 CSS \u65f6\u6307\u5b9a\u6b64\u6d41\u6837\u5f0f\u7c7b \u6d41\u5bfc\u822a\u6309\u94ae\u7684\u6837\u5f0f\u3002\u4f8b\u5982\uff0c\u8f93\u5165 \uff0c\u800c\u4e0d\u662f \u3002<kbd>.FlowPreviousBtn {}<\/kbd><kbd>.FlowPageBlockBtns .FlowPreviousBtn {}<\/kbd><\/td><\/tr><tr><td>FlowCancelBtn<\/td><td>\u201c<strong>\u4e0d\u6682\u505c<\/strong>\u201d\u6309\u94ae\u3002<\/td><\/tr><tr><td>FlowPauseBtn<\/td><td><strong>\u201c\u6682\u505c<\/strong>\u201d\u6309\u94ae\u3002<\/td><\/tr><tr><td>\u6d41\u7a0b\u4e0a\u4e00\u9875Btn<\/td><td><strong>\u201c\u4e0a\u4e00\u6b65<\/strong>\u201d\u6309\u94ae\u3002<\/td><\/tr><tr><td>\u6d41\u4e0b\u4e00\u4e2aBTN<\/td><td>\u201c<strong>\u4e0b\u4e00\u6b65<\/strong>\u201d\u6309\u94ae\u3002<\/td><\/tr><tr><td>FlowFinishBtn<\/td><td>\u201c<strong>\u5b8c\u6210<\/strong>\u201d\u6309\u94ae\u3002<\/td><\/tr><tr><td>\u6d41\u6587\u672c<\/td><td>\u6587\u672c\u5b57\u6bb5\u6807\u7b7e\u3002<\/td><\/tr><tr><td>FlowTextArea<\/td><td>\u6587\u672c\u533a\u57df\u5b57\u6bb5\u6807\u7b7e\u3002<\/td><\/tr><tr><td>\u6d41\u91cf\u7f16\u53f7<\/td><td>\u6570\u5b57\u5b57\u6bb5\u6807\u7b7e\u3002<\/td><\/tr><tr><td>\u6d41\u65e5\u671f<\/td><td>\u65e5\u671f\u5b57\u6bb5\u6807\u7b7e\u3002<\/td><\/tr><tr><td>\u6d41\u8d27\u5e01<\/td><td>\u8d27\u5e01\u5b57\u6bb5\u6807\u7b7e\u3002<\/td><\/tr><tr><td>FlowPassword\uff08\u6d41\u5bc6\u7801\uff09<\/td><td>\u5bc6\u7801\u5b57\u6bb5\u6807\u7b7e\u3002<\/td><\/tr><tr><td>FlowRadio\uff08\u82f1\u8bed\uff1aFlowRadio<\/td><td>\u5355\u9009\u6309\u94ae\u5b57\u6bb5\u6807\u7b7e\u3002<\/td><\/tr><tr><td>FlowDropdown<\/td><td>\u9009\u62e9\u5217\u8868\u6807\u7b7e\u3002<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\">\u5728 Visualforce \u9875\u9762\u4e2d\u6e32\u67d3\u6d41\u7a0b\u7684 Lightning \u8fd0\u884c\u65f6<\/h2>\n\n\n\n<p>\u9ed8\u8ba4\u60c5\u51b5\u4e0b\uff0c\u5f53\u60a8\u5728 Visualforce \u9875\u9762\u4e2d\u5d4c\u5165\u6d41\u7a0b\u65f6\uff0c\u8be5\u6d41\u7a0b\u5c06\u4ee5 Classic \u683c\u5f0f\u5448\u73b0 \u8fd0\u884c\u3002\u987e\u540d\u601d\u4e49\uff0cClassic \u8fd0\u884c\u65f6\u7684\u5916\u89c2\u548c\u611f\u89c9\u90fd\u50cf\u5e38\u89c4\u7684 Visualforce \u9875\u9762 \u4ee5\u53ca Salesforce Classic \u684c\u9762\u4f53\u9a8c\u3002\u5982\u679c\u60a8\u5e0c\u671b\u6d41\u7a0b\u5728 Lightning \u4e2d\u6e32\u67d3 \u8fd0\u884c\u65f6\uff0c\u5c06\u6d41 Aura \u7ec4\u4ef6\u5d4c\u5165\u5230 Visualforce \u9875\u9762\u3002<\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li>\u521b\u5efa\u4e00\u4e2a\u58f0\u660e\u5bf9\u7ec4\u4ef6\u7684\u4f9d\u8d56\u5173\u7cfb\u7684 Lightning \u5e94\u7528\u7a0b\u5e8f\u3002<samp>lightning:flow<\/samp><\/li>\n\n\n\n<li>\u6dfb\u52a0 Lightning \u7ec4\u4ef6 \u4f7f\u7528\u7ec4\u4ef6\u5c06 Visualforce JavaScript \u5e93\u6dfb\u52a0\u5230\u60a8\u7684 Visualforce \u9875\u9762\u3002<samp>&lt;apex:includeLightning\/&gt;<\/samp><\/li>\n\n\n\n<li>\u5728 Visualforce \u9875\u9762\u4e2d\uff0c\u5f15\u7528\u4f9d\u8d56\u9879\u5e94\u7528\u3002<\/li>\n\n\n\n<li>\u7f16\u5199\u4e00\u4e2a JavaScript \u51fd\u6570\uff0c\u8be5\u51fd\u6570\u4f7f\u7528 \u5728\u9875\u9762\u4e0a\u521b\u5efa\u7ec4\u4ef6\u3002<samp>$Lightning.createComponent()<\/samp><\/li>\n<\/ol>\n\n\n\n<h2 class=\"wp-block-heading\">\u4f8b<\/h2>\n\n\n\n<pre class=\"wp-block-code\"><code>&lt;aura:application access=\"global\" extends=\"ltng:outApp\" &gt;\n    &lt;aura:dependency resource=\"lightning:flow\"\/&gt;\n&lt;\/aura:application&gt;<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code>&lt;apex:page &gt;\n   &lt;html&gt;\n      &lt;head&gt;\n         &lt;apex:includeLightning \/&gt;\n      &lt;\/head&gt;\n      &lt;body class=\"slds-scope\"&gt;\n         &lt;div id=\"flowContainer\" \/&gt;\n         &lt;script&gt;\n            var statusChange = function (event) {\n               if(event.getParam(\"status\") === \"FINISHED\") {\n                  \/\/ Control what happens when the interview finishes\n \n                  var outputVariables = event.getParam(\"outputVariables\");\n                  var key;\n                  for(key in outputVariables) {\n                     if(outputVariables&#91;key].name === \"myOutput\") {\n                        \/\/ Do something with an output variable\n                     }\n                  }\n               }\n            };\n            $Lightning.use(\"c:lightningOutApp\", function() {\n               \/\/ Create the flow component and set the onstatuschange attribute\n               $Lightning.createComponent(\"lightning:flow\", {\"onstatuschange\":statusChange},\n                  \"flowContainer\",\n                  function (component) {\n                     \/\/ Set the input variables\n                     var inputVariables = &#91;\n                        {\n                           name : 'myInput',\n                           type : 'String',\n                           value : \"Hello, world\"\n                        }\n                     ];\n                     \n                     \/\/ Start an interview in the flowContainer div, and \n                     \/\/ initializes the input variables.\n                     component.startFlow(\"myFlowName\", inputVariables);\n                  }\n               );\n            });\n         &lt;\/script&gt;\n      &lt;\/body&gt;\n   &lt;\/html&gt;\n&lt;\/apex:page&gt;<\/code><\/pre>\n","protected":false},"excerpt":{"rendered":"<p>\u65e0\u6cd5\u4f7f\u7528 \u6d41\u751f\u6210\u5668\u3002\u4f46\u662f\uff0c\u5728 Visualforce \u9875\u9762\u4e2d\u5d4c\u5165\u6d41\u7a0b\u540e\uff0c\u5373\u53ef\u4f7f\u7528 Apex \u4ee3\u7801 \u548c Visualforce \u6807\u8bb0\uff0c\u7528\u4e8e\u5728\u8fd0\u884c\u65f6\u914d\u7f6e\u6d41\u7a0b\uff0c\u4f8b\u5982\u5728 Visualforce \u9875\u9762\u548c\u6d41\u7a0b\uff0c\u6216\u5728\u8fd0\u884c\u65f6\u81ea\u5b9a\u4e49\u6d41\u7a0b\u7684\u5916\u89c2\u3002<\/p>\n","protected":false},"author":1,"featured_media":4120,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[271],"tags":[292],"class_list":["post-4119","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-visualforce-","tag--visualforce-"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v21.7 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>\u4f7f\u7528 Visualforce \u6e32\u67d3\u6d41\u7a0b - \u767d\u767d\u968f\u7b14<\/title>\n<meta name=\"description\" content=\"\u65e0\u6cd5\u4f7f\u7528 \u6d41\u751f\u6210\u5668\u3002\u4f46\u662f\uff0c\u5728 Visualforce \u9875\u9762\u4e2d\u5d4c\u5165\u6d41\u7a0b\u540e\uff0c\u5373\u53ef\u4f7f\u7528 Apex \u4ee3\u7801 \u548c Visualforce \u6807\u8bb0\uff0c\u7528\u4e8e\u5728\u8fd0\u884c\u65f6\u914d\u7f6e\u6d41\u7a0b\uff0c\u4f8b\u5982\u5728 Visualforce \u9875\u9762\u548c\u6d41\u7a0b\uff0c\u6216\u5728\u8fd0\u884c\u65f6\u81ea\u5b9a\u4e49\u6d41\u7a0b\u7684\u5916\u89c2\u3002\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"http:\/\/www.ponybai.com\/?p=4119\" \/>\n<meta property=\"og:locale\" content=\"zh_CN\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"\u4f7f\u7528 Visualforce \u6e32\u67d3\u6d41\u7a0b - \u767d\u767d\u968f\u7b14\" \/>\n<meta property=\"og:description\" content=\"\u65e0\u6cd5\u4f7f\u7528 \u6d41\u751f\u6210\u5668\u3002\u4f46\u662f\uff0c\u5728 Visualforce \u9875\u9762\u4e2d\u5d4c\u5165\u6d41\u7a0b\u540e\uff0c\u5373\u53ef\u4f7f\u7528 Apex \u4ee3\u7801 \u548c Visualforce \u6807\u8bb0\uff0c\u7528\u4e8e\u5728\u8fd0\u884c\u65f6\u914d\u7f6e\u6d41\u7a0b\uff0c\u4f8b\u5982\u5728 Visualforce \u9875\u9762\u548c\u6d41\u7a0b\uff0c\u6216\u5728\u8fd0\u884c\u65f6\u81ea\u5b9a\u4e49\u6d41\u7a0b\u7684\u5916\u89c2\u3002\" \/>\n<meta property=\"og:url\" content=\"http:\/\/www.ponybai.com\/?p=4119\" \/>\n<meta property=\"og:site_name\" content=\"\u767d\u767d\u968f\u7b14\" \/>\n<meta property=\"article:published_time\" content=\"2024-02-24T07:59:48+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2023-12-05T10:07:12+00:00\" \/>\n<meta property=\"og:image\" content=\"http:\/\/www.ponybai.com\/wp-content\/uploads\/2023\/12\/flow-1.png\" \/>\n\t<meta property=\"og:image:width\" content=\"1108\" \/>\n\t<meta property=\"og:image:height\" content=\"157\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"author\" content=\"ponybai\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"\u4f5c\u8005\" \/>\n\t<meta name=\"twitter:data1\" content=\"ponybai\" \/>\n\t<meta name=\"twitter:label2\" content=\"\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4\" \/>\n\t<meta name=\"twitter:data2\" content=\"7 \u5206\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"http:\/\/www.ponybai.com\/?p=4119#article\",\"isPartOf\":{\"@id\":\"http:\/\/www.ponybai.com\/?p=4119\"},\"author\":{\"name\":\"ponybai\",\"@id\":\"http:\/\/www.ponybai.com\/#\/schema\/person\/935c7592c850c65e1e5eba4530dbf883\"},\"headline\":\"\u4f7f\u7528 Visualforce \u6e32\u67d3\u6d41\u7a0b\",\"datePublished\":\"2024-02-24T07:59:48+00:00\",\"dateModified\":\"2023-12-05T10:07:12+00:00\",\"mainEntityOfPage\":{\"@id\":\"http:\/\/www.ponybai.com\/?p=4119\"},\"wordCount\":433,\"publisher\":{\"@id\":\"http:\/\/www.ponybai.com\/#\/schema\/person\/935c7592c850c65e1e5eba4530dbf883\"},\"keywords\":[\"\u4f7f\u7528 Visualforce \u6e32\u67d3\u6d41\u7a0b\"],\"articleSection\":[\"Visualforce \u5f00\u53d1\u4eba\u5458\u6307\u5357\"],\"inLanguage\":\"zh-Hans\"},{\"@type\":\"WebPage\",\"@id\":\"http:\/\/www.ponybai.com\/?p=4119\",\"url\":\"http:\/\/www.ponybai.com\/?p=4119\",\"name\":\"\u4f7f\u7528 Visualforce \u6e32\u67d3\u6d41\u7a0b - \u767d\u767d\u968f\u7b14\",\"isPartOf\":{\"@id\":\"http:\/\/www.ponybai.com\/#website\"},\"datePublished\":\"2024-02-24T07:59:48+00:00\",\"dateModified\":\"2023-12-05T10:07:12+00:00\",\"description\":\"\u65e0\u6cd5\u4f7f\u7528 \u6d41\u751f\u6210\u5668\u3002\u4f46\u662f\uff0c\u5728 Visualforce \u9875\u9762\u4e2d\u5d4c\u5165\u6d41\u7a0b\u540e\uff0c\u5373\u53ef\u4f7f\u7528 Apex \u4ee3\u7801 \u548c Visualforce \u6807\u8bb0\uff0c\u7528\u4e8e\u5728\u8fd0\u884c\u65f6\u914d\u7f6e\u6d41\u7a0b\uff0c\u4f8b\u5982\u5728 Visualforce \u9875\u9762\u548c\u6d41\u7a0b\uff0c\u6216\u5728\u8fd0\u884c\u65f6\u81ea\u5b9a\u4e49\u6d41\u7a0b\u7684\u5916\u89c2\u3002\",\"breadcrumb\":{\"@id\":\"http:\/\/www.ponybai.com\/?p=4119#breadcrumb\"},\"inLanguage\":\"zh-Hans\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"http:\/\/www.ponybai.com\/?p=4119\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"http:\/\/www.ponybai.com\/?p=4119#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"\u9996\u9875\",\"item\":\"http:\/\/www.ponybai.com\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"\u4f7f\u7528 Visualforce \u6e32\u67d3\u6d41\u7a0b\"}]},{\"@type\":\"WebSite\",\"@id\":\"http:\/\/www.ponybai.com\/#website\",\"url\":\"http:\/\/www.ponybai.com\/\",\"name\":\"\u767d\u767d\u968f\u7b14\",\"description\":\"Salesforce\u5b98\u65b9\u8bb2\u5e08\",\"publisher\":{\"@id\":\"http:\/\/www.ponybai.com\/#\/schema\/person\/935c7592c850c65e1e5eba4530dbf883\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"http:\/\/www.ponybai.com\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"zh-Hans\"},{\"@type\":[\"Person\",\"Organization\"],\"@id\":\"http:\/\/www.ponybai.com\/#\/schema\/person\/935c7592c850c65e1e5eba4530dbf883\",\"name\":\"ponybai\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"zh-Hans\",\"@id\":\"http:\/\/www.ponybai.com\/#\/schema\/person\/image\/\",\"url\":\"http:\/\/www.ponybai.com\/wp-content\/uploads\/2025\/03\/cropped-Ihsans-WeChatQR.jpg\",\"contentUrl\":\"http:\/\/www.ponybai.com\/wp-content\/uploads\/2025\/03\/cropped-Ihsans-WeChatQR.jpg\",\"width\":248,\"height\":248,\"caption\":\"ponybai\"},\"logo\":{\"@id\":\"http:\/\/www.ponybai.com\/#\/schema\/person\/image\/\"},\"sameAs\":[\"http:\/\/121.37.188.161\"],\"url\":\"http:\/\/www.ponybai.com\/?author=1\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"\u4f7f\u7528 Visualforce \u6e32\u67d3\u6d41\u7a0b - \u767d\u767d\u968f\u7b14","description":"\u65e0\u6cd5\u4f7f\u7528 \u6d41\u751f\u6210\u5668\u3002\u4f46\u662f\uff0c\u5728 Visualforce \u9875\u9762\u4e2d\u5d4c\u5165\u6d41\u7a0b\u540e\uff0c\u5373\u53ef\u4f7f\u7528 Apex \u4ee3\u7801 \u548c Visualforce \u6807\u8bb0\uff0c\u7528\u4e8e\u5728\u8fd0\u884c\u65f6\u914d\u7f6e\u6d41\u7a0b\uff0c\u4f8b\u5982\u5728 Visualforce \u9875\u9762\u548c\u6d41\u7a0b\uff0c\u6216\u5728\u8fd0\u884c\u65f6\u81ea\u5b9a\u4e49\u6d41\u7a0b\u7684\u5916\u89c2\u3002","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"http:\/\/www.ponybai.com\/?p=4119","og_locale":"zh_CN","og_type":"article","og_title":"\u4f7f\u7528 Visualforce \u6e32\u67d3\u6d41\u7a0b - \u767d\u767d\u968f\u7b14","og_description":"\u65e0\u6cd5\u4f7f\u7528 \u6d41\u751f\u6210\u5668\u3002\u4f46\u662f\uff0c\u5728 Visualforce \u9875\u9762\u4e2d\u5d4c\u5165\u6d41\u7a0b\u540e\uff0c\u5373\u53ef\u4f7f\u7528 Apex \u4ee3\u7801 \u548c Visualforce \u6807\u8bb0\uff0c\u7528\u4e8e\u5728\u8fd0\u884c\u65f6\u914d\u7f6e\u6d41\u7a0b\uff0c\u4f8b\u5982\u5728 Visualforce \u9875\u9762\u548c\u6d41\u7a0b\uff0c\u6216\u5728\u8fd0\u884c\u65f6\u81ea\u5b9a\u4e49\u6d41\u7a0b\u7684\u5916\u89c2\u3002","og_url":"http:\/\/www.ponybai.com\/?p=4119","og_site_name":"\u767d\u767d\u968f\u7b14","article_published_time":"2024-02-24T07:59:48+00:00","article_modified_time":"2023-12-05T10:07:12+00:00","og_image":[{"width":1108,"height":157,"url":"http:\/\/www.ponybai.com\/wp-content\/uploads\/2023\/12\/flow-1.png","type":"image\/png"}],"author":"ponybai","twitter_card":"summary_large_image","twitter_misc":{"\u4f5c\u8005":"ponybai","\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4":"7 \u5206"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"http:\/\/www.ponybai.com\/?p=4119#article","isPartOf":{"@id":"http:\/\/www.ponybai.com\/?p=4119"},"author":{"name":"ponybai","@id":"http:\/\/www.ponybai.com\/#\/schema\/person\/935c7592c850c65e1e5eba4530dbf883"},"headline":"\u4f7f\u7528 Visualforce \u6e32\u67d3\u6d41\u7a0b","datePublished":"2024-02-24T07:59:48+00:00","dateModified":"2023-12-05T10:07:12+00:00","mainEntityOfPage":{"@id":"http:\/\/www.ponybai.com\/?p=4119"},"wordCount":433,"publisher":{"@id":"http:\/\/www.ponybai.com\/#\/schema\/person\/935c7592c850c65e1e5eba4530dbf883"},"keywords":["\u4f7f\u7528 Visualforce \u6e32\u67d3\u6d41\u7a0b"],"articleSection":["Visualforce \u5f00\u53d1\u4eba\u5458\u6307\u5357"],"inLanguage":"zh-Hans"},{"@type":"WebPage","@id":"http:\/\/www.ponybai.com\/?p=4119","url":"http:\/\/www.ponybai.com\/?p=4119","name":"\u4f7f\u7528 Visualforce \u6e32\u67d3\u6d41\u7a0b - \u767d\u767d\u968f\u7b14","isPartOf":{"@id":"http:\/\/www.ponybai.com\/#website"},"datePublished":"2024-02-24T07:59:48+00:00","dateModified":"2023-12-05T10:07:12+00:00","description":"\u65e0\u6cd5\u4f7f\u7528 \u6d41\u751f\u6210\u5668\u3002\u4f46\u662f\uff0c\u5728 Visualforce \u9875\u9762\u4e2d\u5d4c\u5165\u6d41\u7a0b\u540e\uff0c\u5373\u53ef\u4f7f\u7528 Apex \u4ee3\u7801 \u548c Visualforce \u6807\u8bb0\uff0c\u7528\u4e8e\u5728\u8fd0\u884c\u65f6\u914d\u7f6e\u6d41\u7a0b\uff0c\u4f8b\u5982\u5728 Visualforce \u9875\u9762\u548c\u6d41\u7a0b\uff0c\u6216\u5728\u8fd0\u884c\u65f6\u81ea\u5b9a\u4e49\u6d41\u7a0b\u7684\u5916\u89c2\u3002","breadcrumb":{"@id":"http:\/\/www.ponybai.com\/?p=4119#breadcrumb"},"inLanguage":"zh-Hans","potentialAction":[{"@type":"ReadAction","target":["http:\/\/www.ponybai.com\/?p=4119"]}]},{"@type":"BreadcrumbList","@id":"http:\/\/www.ponybai.com\/?p=4119#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"\u9996\u9875","item":"http:\/\/www.ponybai.com\/"},{"@type":"ListItem","position":2,"name":"\u4f7f\u7528 Visualforce \u6e32\u67d3\u6d41\u7a0b"}]},{"@type":"WebSite","@id":"http:\/\/www.ponybai.com\/#website","url":"http:\/\/www.ponybai.com\/","name":"\u767d\u767d\u968f\u7b14","description":"Salesforce\u5b98\u65b9\u8bb2\u5e08","publisher":{"@id":"http:\/\/www.ponybai.com\/#\/schema\/person\/935c7592c850c65e1e5eba4530dbf883"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"http:\/\/www.ponybai.com\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"zh-Hans"},{"@type":["Person","Organization"],"@id":"http:\/\/www.ponybai.com\/#\/schema\/person\/935c7592c850c65e1e5eba4530dbf883","name":"ponybai","image":{"@type":"ImageObject","inLanguage":"zh-Hans","@id":"http:\/\/www.ponybai.com\/#\/schema\/person\/image\/","url":"http:\/\/www.ponybai.com\/wp-content\/uploads\/2025\/03\/cropped-Ihsans-WeChatQR.jpg","contentUrl":"http:\/\/www.ponybai.com\/wp-content\/uploads\/2025\/03\/cropped-Ihsans-WeChatQR.jpg","width":248,"height":248,"caption":"ponybai"},"logo":{"@id":"http:\/\/www.ponybai.com\/#\/schema\/person\/image\/"},"sameAs":["http:\/\/121.37.188.161"],"url":"http:\/\/www.ponybai.com\/?author=1"}]}},"_links":{"self":[{"href":"http:\/\/www.ponybai.com\/index.php?rest_route=\/wp\/v2\/posts\/4119","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/www.ponybai.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/www.ponybai.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/www.ponybai.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/www.ponybai.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=4119"}],"version-history":[{"count":1,"href":"http:\/\/www.ponybai.com\/index.php?rest_route=\/wp\/v2\/posts\/4119\/revisions"}],"predecessor-version":[{"id":4128,"href":"http:\/\/www.ponybai.com\/index.php?rest_route=\/wp\/v2\/posts\/4119\/revisions\/4128"}],"wp:featuredmedia":[{"embeddable":true,"href":"http:\/\/www.ponybai.com\/index.php?rest_route=\/wp\/v2\/media\/4120"}],"wp:attachment":[{"href":"http:\/\/www.ponybai.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=4119"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.ponybai.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=4119"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.ponybai.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=4119"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}