PCMWFCUSTPARAM
ID: PMSGetGSFromK
SQL:
--DECLARE @EmployeeID VARCHAR = '00000002' DECLARE @now VARCHAR = dbo.fn_formatdatetime(GETDATE, 'yyyymmdd')
SELECT
'' AS 'ActionsRequiredforFollowup_49',
'' AS 'ContigencyPlans_49',
'' AS 'EndDate_49',
ROW_NUMBER() OVER AS 'Goals',
om01.ObjectDescription AS 'KPIGroup_49',
'' AS 'MeasuresAchievement_49',
'' AS 'PlanToExecuteTasks_49',
'' AS 'ResourcesNeeded_49',
'' AS 'StartDate_49',
'' AS 'Target_49'
FROM PHROM0002 om02
INNER JOIN PHROM0001 om01 ON om02.ObjectID = om01.ObjectID
WHERE om02.ObjectID in ('00000001','00000002','00000003')
AND om02.ObjectClass = 'K'
AND om02.RelationshipClass = 'KG'
AND om02.StartDate <= @now
AND om02.EndDate >= @now
AND om01.ObjectClass = 'K'
AND om01.StartDate <= @now
AND om01.EndDate >= @now
DEFBIZPROC
BizProcessID: PMS_Goal
OnDocAfterRender:
var body = MinovaUtil.WORKFLOW.getViewBodyWorkflow();
var taskID = MinovaUtil.WORKFLOW.getTaskId();
var EmpID = MinovaUtil.WORKFLOW.getEmpId();
//body.down('field[name=AppraisalType_47]').setValue('G');
//var gridStore = Ext.StoreManager.lookup('storePHRPA0048ESS');
var gridStore49_GS = Ext.StoreManager.lookup('storePHRPA0049ESS1');
var gridStore49_IDP = Ext.StoreManager.lookup('storePHRPA0049ESS2');
if (taskID 'start' || taskID 'create' || taskID == '') {
/*
MinovaUtil.ExecuteParamQuery({
ID: 'PMSDefaultApprG',
empid_requester: MinovaUtil.WORKFLOW.getEmpId(),
now: MinovaUtil.GetNowDate()
}, function (s) {
try {
var result = Ext.decode(s.responseText).data;
var dataGrid = Ext.decode(Ext.decode(result));
gridStore.loadData(dataGrid);
} catch (e) {}
}, function (e) {});
*/
MinovaUtil.ExecuteParamQuery({
ID: 'PMSGetGSFromK',
EmployeeID: EmpID,
now: MinovaUtil.GetNowDate()
}, function (s) {
try {
var result = Ext.decode(s.responseText).data;
var dataGrid = Ext.decode(Ext.decode(result));
gridStore49_GS.loadData(dataGrid);
} catch (e) {}
}, function (e) {});
MinovaUtil.ExecuteParamQuery({
ID: 'PMSGetIDPFromK',
EmployeeID: EmpID,
now: MinovaUtil.GetNowDate()
}, function (s) {
try {
var result = Ext.decode(s.responseText).data;
var dataGrid = Ext.decode(Ext.decode(result));
gridStore49_IDP.loadData(dataGrid);
} catch (e) {}
}, function (e) {});
/*
var AppraisalType = Ext.ComponentQuery.query('[name=AppraisalType_47]')[0].getValue();
var Sequence = Ext.ComponentQuery.query('[name=Sequence_47]')[0];
var Dt = null;
MinovaUtil.ExecuteParamQuery({
ID: "WFPMSGETSEQHEADER",
EmpID: EmpID,
AppType: AppraisalType
}, function (s) {
var result = Ext.decode(s.responseText);
Dt = Ext.decode(Ext.decode(result.data));
if (Dt.length > 0) {
Sequence.setValue(Dt[0].NextSeq)
}
}, function (f) {});
Ext.ComponentQuery.query('[name=EmployeeID_47]')[0].setValue(EmpID);
*/
} else {
if(taskID != 'revise_creator')
{
body.down('button[name=PHRPA0049ESS1Add]').hide();
body.down('button[name=PHRPA0049ESS1DeleteText]').hide();
}
}
setTimeout(function () {
//Ext.ComponentQuery.query("[name=gridPHRPA0048ESS]")[0].view.refresh();
Ext.ComponentQuery.query("[name=gridPHRPA0049ESS1]")[0].view.refresh();
Ext.ComponentQuery.query("[name=gridPHRPA0049ESS2]")[0].view.refresh();
}, 5000);
/*
body.down('button[name=PHRPA0048ESSAdd]').hide();
body.down('button[name=PHRPA0048ESSDeleteText]').hide();
*/