Hi all,
I am not sure if it is even possible, but I think I have seen some standard AX batch job doing the same. I have a query on my data contract class that I use in my service class to loop and do stuff in batch.
I want to give users a pop up to say, the query has "10000000" records, you want to continue?
I tried putting the following in my contract class but the pop up doesnt appear (because it is a batch) and returns it as false. Is there any way to achieve it?
public boolean validate()
{
boolean isValid = false;
QueryRun queryRun = new QueryRun(this.getQuery());
int totalRecords = SysQuery::countTotal(queryRun);
if (totalRecords)
{
if(Box::yesNo(strFmt("This process will work on %1 records, do you want to continue?",totalRecords),DialogButton::No) == DialogButton::Yes)
{
isValid = true;
}
}
return isValid;
}
*This post is locked for comments