Copy link to clipboard
Copied
Hi,
I coded a Javacript window with different items that fill in elements of form that is used as a stamp. Textboxes and radio buttons are working fine, however I'm struggling with retrieving the Check box informatio: Console says undefined. Here is the relevant piece of code:
// Dialog Definition
var oDlg =
{
strchkPaid: "False",
initialize: function(dialog)
{
dialog.load
(
{
"chkPaid":this.strchkPaid,
}
);
},
commit: function(dialog)
{
var data = dialog.store();
this.strchkPaid= data["chkPaid"];
},
description:
{
name: "Refacturation",
elements:
[
{
type: "view",
elements: [
{
item_id: "chkPaid",
name: "Payé par carte de crédit",
type: "check_box",
},
]
},
]
}
};
// Dialog Activation
app.execDialog(oDlg)
if((event.source.forReal)&&(event.source.stampName == "#EtampeTI"))
{
if(oDlg.strchkPaid){this.getField("chkBoxPaid").value = "Yes";}else{this.getField("chkBoxPaid").value = "No";}
}
oDlg.strchkPaid seems to return undefined.
Any ideas?
Thanks in advance.
Copy link to clipboard
Copied
Found it while posting. Thanks to Karl Heinz Kremer : Item Ids can only have four letters, the corresponding ID for this field is "sdNum" - and therefore five characters long.
Copy link to clipboard
Copied