Solved

OFFLINE queries not working-not able to add sync policy & offline filter to query as getting error 'Rule/Property deprecated from target version 23R1 Onwards'

  • 29 November 2023
  • 5 replies
  • 37 views

Badge +3

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 

icon

Best answer by kathlk 29 November 2023, 18:30

View original

5 replies

Userlevel 6
Badge +14

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.   

Badge +3

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

Badge +3

@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

 

Userlevel 6
Badge +14

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. 

Userlevel 6
Badge +14

Example in the CORE. 

ServiceEngApp

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

 

Reply