Skip to main content
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'


KNikitha5
Do Gooder (Partner)
Forum|alt.badge.img+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 

Best answer by kathlk

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.   

View original
Did this topic help you find an answer to your question?

5 replies

kathlk
Hero (Employee)
Forum|alt.badge.img+14
  • Hero (Employee)
  • 291 replies
  • Answer
  • November 29, 2023

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.   


KNikitha5
Do Gooder (Partner)
Forum|alt.badge.img+3
  • Author
  • Do Gooder (Partner)
  • 9 replies
  • November 29, 2023

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


KNikitha5
Do Gooder (Partner)
Forum|alt.badge.img+3
  • Author
  • Do Gooder (Partner)
  • 9 replies
  • November 30, 2023

@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

 


kathlk
Hero (Employee)
Forum|alt.badge.img+14
  • Hero (Employee)
  • 291 replies
  • November 30, 2023

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. 


kathlk
Hero (Employee)
Forum|alt.badge.img+14
  • Hero (Employee)
  • 291 replies
  • November 30, 2023

Example in the CORE. 

ServiceEngApp

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

 


Reply


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings