[英]NetSuite dialog box with text field input (SuiteScript 2.0)
Using SuiteScript 2.0, it looks like you can create alert/confirmation boxes using their UI framework (using N/ur/dialog module).使用 SuiteScript 2.0,您似乎可以使用其 UI 框架(使用 N/ur/dialog 模块)创建警报/确认框。 Does anyone know if there's a way using the SuiteScript API to include a text input field (which the user can type into) on an alert or confirmation box?
有谁知道是否有办法使用 SuiteScript API 在警报或确认框中包含文本输入字段(用户可以输入)?
This is not officially supported, but seeing that N/ui/dialog is basically a wrapper function on Ext.js, you can use the following to create a NS styled input box:这个没有官方支持,但是看到 N/ui/dialog 基本上是 Ext.js 上的一个包装函数,你可以使用下面的来创建一个 NS 样式的输入框:
Ext.Msg.prompt('Title', 'Message', function(btn, text) {
if (btn == 'ok') {
alert('you said ' + text);
}
});
Use clientscript to add this function to the button:使用 clientscript 将此功能添加到按钮:
function promptForInput(){
var theResponse = prompt('Type now');
alert('User typed ' + theResponse);
}
Now there's a better way: Use the NetSuite Input Dialog module which I recently released.现在有一个更好的方法:使用我最近发布的NetSuite 输入对话框模块。 Cheers.
干杯。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.