Loading
Quip
目录
选择筛选器

          没有结果
          没有结果
          以下是一些搜索提示

          检查关键字的拼写。
          使用更普遍的搜索词。
          选择更少的筛选器,并扩大搜索范围。

          搜索所有 Salesforce 帮助
          为 Quip 关联文档组件创建自定义控制器

          为 Quip 关联文档组件创建自定义控制器

          创建自定义控制器时,将 Lightning 组件添加到更多 Salesforce 记录。

          所需的 Edition

          适用于:Salesforce Classic(并非在所有组织中可用
          所需用户权限
          自定义控制器: 自定义应用程序
          1. 创建新的 Apex 类。
          2. 将其命名为 myCustomOppController
          3. 将页面命名为 QuipCard
          4. 复制并粘贴以下代码。
            public class myCustomOppController {
                public String recordId {get; set;}
                
                public myCustomOppController(ApexPages.StandardController stdController) {
                    setRecordIdForQuip(stdController.getRecord().id);
                }
                
                private void setRecordIdForQuip(Id recordId) {
                    this.recordId = recordId;
                }
            }
          5. 使用此代码替换 QuipCard.vfp 代码。
            <apex:page sidebar="false" standardController="Opportunity" extensions="myCustomOppController" >
              <apex:includeLightning />
              <div id="quipCardContainer"/>
              
              <script>
                $Lightning.use("c:QuipCard", function() {
                    $Lightning.createComponent("lightning:quipCard", 
                    { "parentRecordId": "{!recordId}" },
                    "quipCardContainer",
                    function(cmp) {}
                  );
                });
              </script>
            </apex:page>
           
          正在加载
          Salesforce Help | Article