Salesforce 在任务中为Visualforce中的自定义对象展开查找

Salesforce 在任务中为Visualforce中的自定义对象展开查找,salesforce,visualforce,Salesforce,Visualforce,我对这方面很陌生,希望能得到一些帮助。我正在尝试为Visualforce中的“活动(任务)”页面创建一个扩展的查找字段。我想让它查找一个我称之为电话销售员的自定义对象 这是我到目前为止所拥有的,我似乎无法让它工作 <apex:page standardController="Task"> <apex:form > <apex:inputField value="{!task.telemarketer.name_c}"/> </apex:f

我对这方面很陌生,希望能得到一些帮助。我正在尝试为Visualforce中的“活动(任务)”页面创建一个扩展的查找字段。我想让它查找一个我称之为电话销售员的自定义对象

这是我到目前为止所拥有的,我似乎无法让它工作

<apex:page standardController="Task">
  <apex:form >
    <apex:inputField value="{!task.telemarketer.name_c}"/>
  </apex:form>
</apex:page>

我尝试过将{!task.telemarketer.name_c}更改为其他内容,但不断出现以下错误: “SObject任务的现场电话销售员无效” “无法从页面示例1中的值绑定“{!task.telemarketername_c}”解析字段“telemarketername_c” “无法从页面示例1中的值绑定“{!task.telemarketername}”解析字段'telemarketername'”


请帮帮我!!我快发疯了以下是我的观察结果

1) 不确定是否在apex页面上使用Id Url应该类似于- Id是必需的,因为您正在尝试输入特定记录的字段

2) 关于字段名称,请在visualforce页面中选择字段的api名称

这里有代码

<apex:page standardController="Task">
  <apex:form >
    <apex:pageBlock title="My Content" mode="edit"> 
      <apex:pageBlockSection title="My Content Section" columns="2">
         <apex:inputfield value="{!task.status}"/>
         <apex:inputfield value="{!task.whoid}"/>
      </apex:pageBlockSection>
    </apex:pageBlock>
  </apex:form>
</apex:page>

要使用标准的Salesforce查找对话框,下一个Visualforce标记应该可以使用(假设您已经为Task sObject创建了一个API名称为“Telemarketer\uu\c”的自定义字段):

<apex:page standardController="Task">
<apex:form >
<apex:pageBlock title="Task Details" mode="edit"> 
  <apex:pageBlockSection title="Task Telemarketer Lookup Field" columns="1">
    <apex:inputfield value="{!task.Telemarketer__c}"/>
  </apex:pageBlockSection>
</apex:pageBlock>
Task.Telemarketer__c // this is correct
Task.Telemarketer_c  // unknown field "Telemarketer_c" for object Task