Guys, I am struggling to add variants to the variants dataset using JScript on a web page
You know that there is no way to check or debug java scripts in PSS so it takes heck or a lot time to verify. So far I have made a form and buttons, but when I add the script below the form stops opening. What is wrong here?
//On 'ok' button click
$('#confirm').click(function ()
{
//Save and close iframe
IDataSet dataSet = Context.DataSet("%Section%/Variants");
IDataSetRecord rec = dataSet.CreateRecord();
rec.AddValue( "VariantName", $('#VariantName').val());
rec.AddValue( "IBAN", $('#IBAN').val());
rec.AddValue( "EuropeanVATID", $('#EuropeanVATID').val());
rec.AddValue( "DomesticVATID", $('#DomesticVATID').val());
rec.AddValue( "CompanyAddress", $('#CompanyAddress').val());
rec.AddValue( "CompanyZip", $('#CompanyZip').val());
rec.AddValue( "CompanyCity", $('#CompanyCity').val());
dataSet.addRecord( rec );
save();
}