The SysOperation framework handles
- basic user interface creation
- parameter serialization
- routing to the CLR execution environment.
internal final class DaxContractClass extends sysoperationDataContrcatBase
{
//declare parameters.
}
service Class Signature:-
internal final class ServiceClass extends sysyoperationserviceBase
{
public void processoperation() { // main logic }
}
Controller Class:-
public class SysOperationControllerClass extends SysOperationServiceController {
public void new() { super(); this.parmClassName(classStr(serviceClasName)); this.parmMethodName(methodStr(serviceClasName, MainMethod Name));
}
Write the lookup code within the UIBuilder class:-
internal final class PRO_MovingDocFilesFromBolbToSharPointUIBuilder extends SysOperationAutomaticUIBuilder
{
DialogField refTableId;
public void postRun()
{
super();
refTableId = this.bindInfo().getDialogField(this.dataContractObject(),
methodStr(PRO_MovingDocFilesFromBolbToSharPointContract, parmRefTableId));
// register overrides for form control events
refTableId.registerOverrideMethod(methodStr(FormIntControl, lookup),
methodStr(PRO_MovingDocFilesFromBolbToSharPointUIBuilder, lookupRefTableId), this);
}
private void lookupRefTableId(FormIntControl _formStringControl)
{
Query query = new Query();
QueryBuildDataSource qbds;
SysTableLookup sysTableLookup;
sysTableLookup = SysTableLookup::newParameters(tableNum(DocuRef), _formStringControl);
sysTableLookup.addLookupfield(fieldNum(DocuRef, RefTableId), true);
qbds = query.addDataSource(tableNum(DocuRef));
qbds.addGroupByField(fieldNum(DocuRef, RefTableId));
qbds.orderMode(OrderMode::GroupBy);
sysTableLookup.parmQuery(query);
sysTableLookup.parmUseLookupValue(false);
sysTableLookup.performFormLookup();
}
}
No comments:
Post a Comment