RE: Error : "Invalid sort field" D365 F&O
Hello Team, This issue has been solved. this is what i found during my investigation.
> I found that only for two record which was not sorted, this issue was happening for rest other records it was working fine, so i believe this was due to records incorrect sort. then i was thinking of writing some sort method to sort the record correctly.
But this is how i solved this issue.
I removed Projid EDT from table field and write a manual lookup from projtable , below is the lookup method i wrote and this solved my issue.
[Control("String")]
class DRFProjectTable_ProjID
{
///
///
///
public void lookup()
{
SysTableLookup sysTableLookup;
Query query;
QueryBuildDataSource queryBuildDataSource;
QueryBuildRange queryBuildRange;
smmOpportunityTable smmopp;
query = new Query();
sysTableLookup = SysTableLookup::newParameters(tableNum(ProjTable), this);
sysTableLookup.addLookupField(fieldNum(ProjTable, ProjId));
sysTableLookup.addLookupField(fieldNum(ProjTable, Name));
queryBuildDataSource = query.addDataSource(tableNum(ProjTable));
sysTableLookup.parmQuery(query);
sysTableLookup.performFormLookup();
}
}
Thank you so much Blue and Gunjan for helping me on this issue.