本文介绍了在salsforce中创建一个选择对象字段的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

首先,我只是Salesforce的初学者,并开始使用apex学习visualforce页面,

First, I'm just a beginner in salesforce and started to learn visualforce page using apex,

基本上我有默认对象"people",并且其中有许多记录

basically I have the default object "people", and many records in it

现在是要编写一个付款"可视页面,以允许人们选择人们的记录

now is to write a "payment" visual page to allow people to select the people record

它们是主从关系,在页面侧和apex类中都应使用哪个apex标签?类似于下面的时间选择器之一:

they are master-details relationship, what apex tag should I use in both page side and apex class? similar like time selector one below:

页面代码:

<apex:inputField value="{!proxyObject.closeDate}"/> 

班级:

opportunity o = new Opportunity();

public Opportunity getProxyObject() { return o; }

有人可以帮助我吗?任何建议都欢迎!!!

Can any body help me with it? Any kind of suggestions are welcomed!!!

推荐答案

如果您有从机会到人们的查找字段,只需在页面上写这样的<apex:inputField value="{!proxyObject.people__c}"/>

If you have lookup field from opportunity to people just write on page something like this <apex:inputField value="{!proxyObject.people__c}"/>

这篇关于在salsforce中创建一个选择对象字段的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

10-24 19:50