Skip to main content

I have added below query and not able to add syncpolicy and offlinequery to the query declartion as i am getting the error “Rule/Property deprecated from target version 23R1 Onwards

query CNonMegaAssignments {

   from = "Mobile_Work_Order";
   where = "UPPER(Jt_Task_Api.get_c_call_id(task_seq)) not like UPPER('Mega%')";
   keys = WoNo, TaskSeq, ExecutionInstanceSeq;
   attribute TaskSeq Number;
   attribute ExecutionInstanceSeq Number;
   attribute CCallId Text {
      fetch = "Jt_Task_Api.get_c_call_id(task_seq)";
   }
}

If i try to use above query then i am not getting the data in mobile but getting the data in cloud mobile screen

@Yasas Kasthuriarachchi @James Ashmore @Rukmal Fernando @Uthpala 

Hi,

offlinequery had been deprecated from Projection and moved to the app model instead. This has been done when mobile started to support split projections. So from 23.1 EA onward you should move the offlinequery to the app model as end of support for this deprecation.   


Thank you Kathuk.. Can you please refer me any existing example present in core files that  I will try and get back to you


@kathlk

still i am not getting the data in MWO but getting data in cloud mobile screens

I have tried to add below query syntax in .app file

And Added below code in .projection file

 


Hi

 

Sync policy ‘None’ indicates this as a local query which runs on the local database (offline). To sync data from backend, you should use relevant sync policies for example Batch/Push. 

You should see a sync rule associated with your query in the ‘Sync Rules’ tables in the solution manager. 


Example in the CORE. 

ServiceEngApp

   query MobileUserAssortInvPart {
syncpolicy Batch {
syncschedule = daily at 00:00;
}
}

 


Reply