Hey Martin.I will share the contract class code and UI Builder class code.Thank you.
[
DataContractAttribute,
SysOperationContractProcessingAttribute(classStr(PMIPBillingScheduleCreateUIBuilder))
]
class PMIPBillingScheduleCreateContract
{
str packedQuery;
int daysInAdvance;
TransDate processDate;
boolean autoCreatePrebillingSummary,allowToDuplicateBillingPeriod;
Object caller;
[
DataMemberAttribute('ProcessDate'),
SysOperationLabel(literalStr("Process date")),
SysOperationDisplayOrderAttribute('3')
]
public TransDate parmProcessDate(TransDate _processdate = processDate)
{
processDate = _processdate;
return processDate;
}
[
DataMemberAttribute('AutoCreatePrebillingSummary'),
SysOperationLabel(literalStr("@AXP:AXP4165")),
SysOperationDisplayOrderAttribute('4')
]
public boolean parmIncludePreBillingSummary(boolean _autoCreatePrebillingSummary = autoCreatePrebillingSummary)
{
autoCreatePrebillingSummary = _autoCreatePrebillingSummary;
return autoCreatePrebillingSummary;
}
[
DataMemberAttribute('AllowToDuplicateBillingPeriod'),
SysOperationLabel(literalStr("@AXP:AXP4167")),
SysOperationDisplayOrderAttribute('2')
]
public boolean parmAllowToDuplicateBillingPeriod(boolean _allowToDuplicateBillingPeriod = allowToDuplicateBillingPeriod)
{
allowToDuplicateBillingPeriod = _allowToDuplicateBillingPeriod;
return allowToDuplicateBillingPeriod;
}
[
DataMemberAttribute('DaysInAdvance'),
SysOperationLabel(literalStr("Days in Advance")),
SysOperationDisplayOrderAttribute('1')
]
public int parmDaysInAdvance(int _daysInAdvance = daysInAdvance)
{
daysInAdvance = _daysInAdvance;
return daysInAdvance;
}
[
DataMemberAttribute,
AifQueryTypeAttribute('_packedQuery', queryStr(PMIPContractBillingFrequencyQuery))
]
public str parmPackedQuery(str _packedQuery = packedQuery)
{
packedQuery = _packedQuery;
return packedQuery;
}
public Query getQuery()
{
return new Query(SysOperationHelper::base64Decode(packedQuery));
}
public void setQuery(Query _query)
{
packedQuery = SysOperationHelper::base64Encode(_query.pack());
}
[
DataContractAttribute('Caller'),
SysOperationLabel(literalStr("Caller Form"))
]
public Object parmCaller(Object _caller = caller)
{
caller = _caller;
return caller;
}
}
UIBuilder Class Code:
class PMIPBillingScheduleCreateUIBuilder extends SysOperationAutomaticUIBuilder
{
DialogField processDate, daysInAdvance;
DialogField autoCreatePreBillingSummary;
/// <summary>
/// “Process date” (date). Defaulted as today’s date.
///“Days in advance” (integer). Defaulted as zero.
/// </summary>
public void postBuild()
{
PMIPBillingScheduleCreateContract contract = this.dataContractObject();
super();
processDate = this.bindInfo().getDialogField(contract, methodStr(PMIPBillingScheduleCreateContract, parmProcessDate));
daysInAdvance = this .bindInfo().getDialogField(contract, methodStr(PMIPBillingScheduleCreateContract, parmDaysInAdvance));
daysInAdvance.value(0);
autoCreatePreBillingSummary = this .bindInfo().getDialogField(contract, methodStr(PMIPBillingScheduleCreateContract, parmIncludePreBillingSummary));
autoCreatePreBillingSummary.visible(PSAParameters::find().PMIPActivatePreBillingSummary);
processDate.value(DateTimeUtil::getToday(DateTimeUtil::getUserPreferredTimeZone()));
}
}