Today, I will be discussing about one of the issue which any one has encountered while adding a lookup on data set and it is not visible in EP specially on Purchase Requisition details form. So I will be sharing here the code snippet which can used to show that data set lookup for any field.
void dataSetLookup(SysDataSetLookup _sysDataSetLookup)
{
Query query;
TableId lookupTableNum;
lookuptablenum = tableNum(PurchReqTable);
_sysDataSetLookup.parmLookupFields(new List(Types::String));
_sysDataSetLookup.parmLookupFields().addEnd(fieldStr(PurchReqTable,PurchReqId));
_sysDataSetLookup.parmLookupFields().addEnd(fieldStr(PurchReqTable,TestField1));
_sysDataSetLookup.parmLookupFields().addEnd(fieldStr(PurchReqTable,PurchReqId));
_sysDataSetLookup.parmLookupFields().addEnd(fieldStr(PurchReqTable,Originator));
_sysDataSetLookup.parmSelectField(fieldStr(PurchReqTable,TestField1));
query = new Query(queryStr (PurchReqTableListPage));
query.dataSourceNo(1).addRange(fieldNum(PurchReqTable,TestField1type)).value(enum2str(RequisitionType::Type1));
query.dataSourceNo(1).addRange(fieldNum(PurchReqTable,RequisitionStatus)).value(enum2str(PurchReqRequisitionStatus::Approved));
query.dataSourceNo(1).addRange(fieldNum(PurchReqTable,BlanketOnHold)).value(enum2str(NoYes::no));
query.allowCrossCompany(true);
_sysDataSetLookup.parmQuery(query);
_sysDataSetLookup.parmDataSet(SysDataSetBuilder::constructLookupDataSet(lookupTableNum).toDataSet());
}
Note : This construct method is quite helpful in showing lookup
Subscribe to:
Post Comments (Atom)
Custom Business events Part 3 - (Activate custom business event) in D365 F&O
In this blog we will discuss about the steps to activate a custom business in D365 F&O. As we know that business event catalog does not...
-
Today, I will share another part of connecting azure blob storage with Dynamics 365 for finance and operations series. This part will be abo...
-
Today I will be discussing about how to create batch job through x++. Before going in code lets discuss what are batch jobs. Batch job : ...
-
Today, I will share another part of connecting azure blob storage with Dynamics 365 for finance and operations series. This part will be abo...
No comments:
Post a Comment
Note: only a member of this blog may post a comment.