如何在可视化强制页面中显示自定义对象的编辑按钮,并允许用户编辑自定义对象?
答案 0 :(得分:1)
创建一个按钮:
<apex:commandButton action="{!MyEdit}" value="edit">
<apex:params value="{!theIdOfTheRecordToEdit}" name="MyId" assignTo=”{!theId}” />
</apex:commandbutton>
在控制器中创建一个全局参数和一个动作 public String theId {get; set;}
public pagereference MyEdit() {
return(new pagereference('/'+theId+'/e'));
}
'魔术'最后在'/ e'。