Peoplesoft:通过peoplecode制作按钮 [英] Peoplesoft : making pushbutton required through peoplecode

查看:144
本文介绍了Peoplesoft:通过peoplecode制作按钮的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有人可以告诉我以下方案的代码。



说我在页面上有两个字段和一个按钮(标准页面)

Field1:A(必填)

Field2:B

与字段B相关的按钮



按钮带有放大镜符号。单击按钮将我带到辅助页面。在辅助页面上单击确定后,辅助页面的结果将被提供给标准页面的字段B.



在按钮的记录字段fieldchange事件中,

以下是编写的逻辑。

保存标准页面后,如果字段B为空,则字段A的值保存为B值。



如果字段B给定值,A(串联)B的值保存到字段B中。



如果字段B值是从辅助页面给出的,则A的值(连接)辅助页面值保存到字段B中。



但是这里的要求是,在给出辅助页面的值之前,页面不应该被保存。即,按钮应该是必需的。



实现这一目标的最佳方法是什么?实现这一目标的一段代码将是有帮助的。

尝试将 record.Field.showrequiredfieldque = true 放入记录字段fieldchange事件中没有帮助。



对此有任何建议吗?



我尝试了什么:



尝试在记录字段fieldchange事件中放置record.Field.showrequiredfieldque = true没有帮助。

Can someone please tell me the code for the following scenario.

Say I have two fields and a push button on a page(standard page)
Field1 : A(required)
Field2 : B
A pushbutton related to field B

The pushbutton has the magnifying glass symbol. Clicking upon the pushbutton takes me to the secondary page. Upon clicking 'OK' on secondary page, the outcome of the secondary page is given to the field B of standard page.

In the record field fieldchange event for pushbutton,
The following is the logic written.
Upon saving the standard page, if field B is empty, the value of field A gets saved into value of B.

If field B is given value, the value of A (concatenation) B gets saved into field B.

If field B value Is given from secondary page, the value of A (concatenation) secondary page value gets saved into field B.

But the requirement here is, the page should not get saved until the values of the secondary page is given. I.e.. the push button should be made 'required'.

What is the best way to achieve this? Piece of code to achieve this would be helpful.
Have tried putting record.Field.showrequiredfieldque=true in the record-field fieldchange event doesn't help.

Any suggestions on this please?

What I have tried:

Have tried putting record.Field.showrequiredfieldque=true in the record-field fieldchange event doesn't help.

推荐答案

我会尝试添加一个与按钮无关的自定义字段,并将记录定义中的字段设置为required,这将使用户无法保存页面而不向字段提供值。那有什么帮助呢?简单,隐藏字段并将PeopleCode绑定到必需按钮,在新的自定义必填字段中放置一个值。确保将字段的默认值属性留空,我建议将保存后的代码保留为删除值,以便在用户从头再次选择相同的数据集时再次使用该字段。



那可能有效。
I would try adding a custom char field that is unrelated to the button and set the field in the record definition to required and that will keep the user from being able to save the page with out supplying the field with a value. So how does that help? Simple, hide the field and have the PeopleCode tie to the Required Push Button place a value in the new custom required field. Make sure to leave the default value attribute blank for the field and I suggest placing post-save code to delete the value so the field is usable again if the user selects the same dataset again from scratch.

That might work.


这篇关于Peoplesoft:通过peoplecode制作按钮的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆