Peoplecode 中的 @ 符号
我正在尝试弄清楚为什么它不允许我从 PeopleSoft CRM 中的特定页面附加文件(它将显示一条错误消息“AddAttachment() 调用失败。”),但它确实让我可以退出 PeopleTools 测试公用事业。
URL 似乎有问题。
查看这些跟踪,最引起我注意的行如下:
- 来自 PeopleTools 测试实用程序的正确跟踪:
22: &RETCODE = AddAttachment(@(&URL_ID), &ATTACHSYSFILENAME, &文件扩展名、&附加用户文件、&文件大小);
EvalAddAttachment:已处理的 URL 目录条目(在恢复时)。 IsURLValid:屏蔽指定的 FTP URL = http://localhost:8230/psfiletransfer/demo/crm/ GetLocalFilePath:文件的临时副本是 /usrpsoft/demo/appserv/demo/files/psfileproc/A_de22a2f6-ffbf-11e0-8135-c80dfccab65c/borrador.txt
- 从返回错误的页面跟踪:
24: &RETCODE = AddAttachment(&URL_ID, &ATTACHSYSFILENAME, &文件扩展名、&附加用户文件、&文件大小);
IsURLValid:屏蔽指定的 FTP URL = http://localhost:8230/psfiletransfer/demo/crm/ GetLocalFilePath:文件的临时副本是 /usrpsoft/demo/appserv/demo/files/psfileproc/A_5da2dbaa-ffab-11e0-8135-c80dfccab65c/borrador.txt
首先, @ 符号在 Peoplecode 中意味着什么?
在第一个跟踪中,它出现在 URL 参数之前。我浏览了 Peoplecode 文档,但找不到它。
还有一件事:第一条跟踪的第二行不会出现在第二条跟踪中。
有谁知道会发生什么?
谢谢!!!
I'm trying to work out why it won't let me attach a file from a specific page in PeopleSoft CRM (it will show an error saying 'The AddAttachment() call failed.') while it does let me from the PeopleTools Test Utilities.
There seems to be a problem with the URL.
Looking at the traces, the lines that caught my attention the most are the following:
- Correct trace from the PeopleTools Test Utilities:
22: &RETCODE = AddAttachment(@(&URL_ID), &ATTACHSYSFILENAME,
&FILEEXTENSION, &ATTACHUSERFILE, &FILESIZE);EvalAddAttachment: processed URL catalog entry (on resume). IsURLValid: masked specified FTP URL = http://localhost:8230/psfiletransfer/demo/crm/ GetLocalFilePath: temporary copy of file is /usrpsoft/demo/appserv/demo/files/psfileproc/A_de22a2f6-ffbf-11e0-8135-c80dfccab65c/borrador.txt
- Trace from the pages that returns an error:
24: &RETCODE = AddAttachment(&URL_ID, &ATTACHSYSFILENAME,
&FILEEXTENSION, &ATTACHUSERFILE, &FILESIZE);IsURLValid: masked specified FTP URL = http://localhost:8230/psfiletransfer/demo/crm/ GetLocalFilePath: temporary copy of file is /usrpsoft/demo/appserv/demo/files/psfileproc/A_5da2dbaa-ffab-11e0-8135-c80dfccab65c/borrador.txt
First of all, what does the @ symbol mean in Peoplecode?
In the first trace, it appears right before the URL parameter. I went through the Peoplecode documents and I couldn't find it.
And another thing: the second line of the first trace won't appear in the second trace.
Does anyone know what could be happening?
Thanks!!!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
@
符号用于动态引用对象,在本例中它是一个 URL。关键在于字符串
&URL_ID
中的内容。如果您使用
@(&URL_ID)
,则&URL_ID
应等于URL.MY_URL
。如果是记录,则类似于Record.MY_RECORD
,例如&Rcd = GetRecord(@(&record));
或& ;Rcd = GetRecord(@("Record."| Record.MY_RECORD));
或&Rcd = GetRecord(@("Record.MY_RECORD"));
.至于这个“EvalAddAttachment”我不是100%确定。不过我不会太担心。只需尝试确定变量中的内容(第一个和第二个示例)
&URL_ID。
The
@
symbol is used to dynamically refer to an object and in this case it is an URL.The key is what is in the string
&URL_ID
.If you use
@(&URL_ID)
, then&URL_ID
should equalURL.MY_URL
. If it is for a record, it would be something likeRecord.MY_RECORD
, e.g.&Rcd = GetRecord(@(&record));
or&Rcd = GetRecord(@("Record."| Record.MY_RECORD));
or&Rcd = GetRecord(@("Record.MY_RECORD"));
.As for this "EvalAddAttachment" I'm not 100% sure. I wouldn't be too worried about it though. Just try to identify what is going into your variable (both the 1st and 2nd example)
&URL_ID.
我会进行跟踪或放入消息框并查看传递给
&url_id
的内容。它应该等于上面发布的URL.MY_URL
。如果 url 格式是这样,那么它与您传递给函数的其他一些变量有关。
I'd do a trace or throw in a messagebox and see what is being passed to the
&url_id
. It should be equal toURL.MY_URL
as posted above.If the url format is that, then it has to do with some of your other variables that you are passing into the function.