ALARMus Acclaimed Contributor.
Acclaimed Contributor.
45 views

Java when delete line from table

Form Subscription for table Subscription.
1) Need call java script when delete record on form and parameter for function some field from current table (SubscriptionID)

2) In function need check data of some other field in this table for current (deleted) record with current SubscriptionID
0 Likes
1 Reply
ALARMus Acclaimed Contributor.
Acclaimed Contributor.

Re: Java when delete line from table

My solution is:

FC: Delete is true
system.library.MOSLicense.DelLicAmount(system.vars.$sub_ci, system.vars.$file.subscriptionID);

SL:
function DelLicAmount (LogicalName,S_ID)
{

var Subscr = new SCFile("Subscription");
var Lic = new SCFile("moslicense");
print ("Род Ð¿Ð¾Ð¸Ñ ÐºÐ°:"+ S_ID);
var CurSubscr = Subscr.doSelect('subscriptionID="'+ S_ID +'"');
if (CurSubscr == RC_SUCCESS)
if (record.status == "Active")
{
var CurLic = Lic.doSelect('logical.name="'+ LogicalName+'"');
if ( CurLic == RC_SUCCESS )
{
if (Lic.mos_licislimited==true)
{
Lic.mos_licfreecount++;
Lic.doUpdate();
}
}
}
}

Any comments ?
0 Likes
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.