void dataSetLookup(SysDataSetLookup sysDataSetLookup)
{
SysDataSetBuilder sysDataSetBuilder;
Query query;
QueryBuildDataSource queryBuildDataSource;
;
query = new Query();
queryBuildDataSource = query.addDataSource(tablenum(CITTypeApprovedEquipMaster));
queryBuildDataSource.addRange(fieldnum(CITTypeApprovedEquipMaster,Type))
.value(SysQuery::value(CITEquipmentApplied.TypeOfEquipment));
sysDataSetBuilder = SysDataSetBuilder::constructLookupDataSet(tablenum(CITTypeApprovedEquipMaster));
sysDataSetLookup.parmQuery(query);
sysDataSetLookup.parmDataSet(sysDataSetBuilder.toDataSet());
sysDataSetLookup.parmLookupFields(new List(Types::String));
sysDataSetLookup.parmLookupFields().addEnd('Model');
sysDataSetLookup.parmLookupFields().addEnd('CompanyName');
sysDataSetLookup.parmSelectField("Model");
Monday, May 9, 2011
Saturday, January 15, 2011
Enable debugging on AX EP
Sunday, January 9, 2011
Or (||) condition on AX QueryBuildRange
Syntex :
QueryBuildDataSourceName.addRange(fieldnum(Table,Field)).value(strfmt("((%1 == %2) (%1 == %3))",fieldstr(Table,field),any2int(Value1), any2int(Value2));
Example :
qbdWFWorkItemTable.addRange(fieldnum(WorkflowWorkItemTable,Status)).value(strfmt("((%1 == %2) (%1 == %3))",fieldstr(WorkflowWorkItemTable,Status),any2int(WorkflowWorkItemStatus::Delegated), any2int(WorkflowWorkItemStatus::Pending)));
QueryBuildDataSourceName.addRange(fieldnum(Table,Field)).value(strfmt("((%1 == %2) (%1 == %3))",fieldstr(Table,field),any2int(Value1), any2int(Value2));
Example :
qbdWFWorkItemTable.addRange(fieldnum(WorkflowWorkItemTable,Status)).value(strfmt("((%1 == %2) (%1 == %3))",fieldstr(WorkflowWorkItemTable,Status),any2int(WorkflowWorkItemStatus::Delegated), any2int(WorkflowWorkItemStatus::Pending)));
Saturday, January 8, 2011
How to avoid "User relationship not found for user ID 'Guest' " workflow error
This error come into workflow process when an external user submit any application for workflow and that workflow have some expression, on that time system call SysWorkflowExpression.buildRuntimeReservedTokenDataSource() which check user's party ID by calling SysWorkflowHelper::getDirPartyIdFromUserId(_sysWorkflowTable.Originator);
To avoid this problem we have to check workflow Originator and if that is 'Guest' then we have to bypass above code.
To avoid this problem we have to check workflow Originator and if that is 'Guest' then we have to bypass above code.
Sunday, January 2, 2011
Stop stucked batch job process
Stopped AX services.
ran following comments through SQL server of this test environment.
Delete From BATCHJOB
Delete From BATCH
Delete From BATCHCONSTRAINTS
Delete From BATCHGLOBAL
Restarted the services. and reconfigured the workflow process.
ran following comments through SQL server of this test environment.
Delete From BATCHJOB
Delete From BATCH
Delete From BATCHCONSTRAINTS
Delete From BATCHGLOBAL
Restarted the services. and reconfigured the workflow process.
Subscribe to:
Posts (Atom)
