Skip to main content

Hi All,

 

I’m struggeling with some sync rules. I have a custom view, with a custom metadata table, and a sync rule. When I set the sync rule to Batch-all, it works fine.

But when I put it on Batch-Delta, it only sends a Transaction Type ‘UPDATE’. New records aren’t then pushed to mobile. I tried with Real Time, but then nothing is pushed at all.

 

Any toughts?

Hi,

did you check content of XML of the initial query? Are there all parameters included? Did you define any extract restrictions or extensions?


Hi @Marcin Drozdowski 

 

Xml is fine, and all parameters are included. I also have an extraxt rule. Is an Batch-Delta sync rule only for updating existing records, and not capabele of sending a DELETE transaction?  


Hey @drooij 

Have you resolved your issue? If yes, can you please write what it is?

Cheers!


Based on the original question, I believe that Batch-All is the only valid method.  If you have a database VIEW in the sync rule, there is no mechanism to trigger any action when data updates.  The sync rule must be based on a database TABLE for inserts/updates/deletes to trigger an extract..  There is no baseline business policy that will be executed to send an outbound message if data in the source tables of a view is changed.  


Hi @BrianG ,

Thank you.

“The sync rule must be based on a database TABLE for inserts/updates/deletes”

Is it possible to create a new database table, besides via a sql view with a custom metadata?


Hi @drooij ,

Yes, you can certainly create custom database tables and custom metadata to define the custom tables.  The question of why you would choose a table or a view would be answered by your purpose for the custom object.  It is common to create a view to sync to mobile if you only need to view the data and not update it in the mobile client.  A typical use is for service history.  In this scenario you should use a Batch-All sync rule. 


Hi @BrianG ,

Thanks,

“It is common to create a view to sync to mobile if you only need to view the data and not update it in the mobile client”

We have a scenario where we the data also can be modified/deleted. A batch all isn’t preferred due to performance. But I understand it’s not possible with a custom view, I need to create a table for that. We don’t have enough permission to create a new table via SQL Server Management. 

Do you know if creating a table via SQL will work? For example:

CREATE TABLE table_name (
    column1 datatype,
    column2 datatype,
    column3 datatype,
);    


Hi @drooij ,

Yes, you can certainly create a new custom table in the database with the right permissions.  I’m going off memory, but I believe you can do it with the built-in SQL Query screen if your role has a function something like ALLOWDBEDIT.  If that doesn’t work, then whoever is your DBA can add the table and appropriate indexes.  Someone on this community probably knows for sure.  I don’t have access to an FSM environment anymore.


Reply