Quantcast
Channel: Microsoft Dynamics AX Forum - Recent Threads
Viewing all articles
Browse latest Browse all 175888

Validating SysOperationDataContract using a pop up box for a batch job

$
0
0

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;
}


Viewing all articles
Browse latest Browse all 175888

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>