Hey @AnupamaHN
Can you share with us the sync rules?
- TASK_ATTACHMENT
- ATTACHMENT
Cheers!
Hi @Shneor Cheshin
Thanks for reaching out to me. Please find the sync rules attached bellow.
- ATTACHMENT:
Ownership query:
<hierarchy_select>
<primary_table>task_assignment_view</primary_table>
<from>
<table>task_assignment_view</table>
<table>task_attachment</table>
<table>attachment</table>
</from>
<attrs>
<attr>task_assignment_view.person_id</attr>
</attrs>
<where>
<data_constraint>
<constraint>
<left_operand>attachment.attachment_id</left_operand>
<operator>eq</operator>
<right_operand>{ATTACHMENT_ID}</right_operand>
</constraint>
</data_constraint>
<join_constraint>
<constraint>
<left_operand>task_assignment_view.task_id</left_operand>
<operator>equi</operator>
<right_operand>task_attachment.task_id</right_operand>
</constraint>
<constraint>
<left_operand>task_attachment.attachment_id</left_operand>
<operator>equi</operator>
<right_operand>attachment.attachment_id</right_operand>
</constraint>
</join_constraint>
</where>
</hierarchy_select>
- TASK_ATTACHMENT:
Ownership query:
<hierarchy_select return_only_requested_attrs="true" max_rows='50000'>
<primary_table>task_assignment_view</primary_table>
<from>
<table>task_assignment_view</table>
</from>
<attrs>
<attr>task_assignment_view.person_id</attr>
</attrs>
<where>
<data_constraint>
<constraint>
<left_operand>task_assignment_view.task_id</left_operand>
<operator>eq</operator>
<right_operand>{task_id}</right_operand>
</constraint>
</data_constraint>
</where>
</hierarchy_select>
Related Query:
<hierarchy_select return_only_requested_attrs="true" max_rows="50000">
<primary_table>task_attachment</primary_table>
<attrs>
<attr>task_attachment.*</attr>
<attr>attachment.*</attr>
</attrs>
<from>
<table>task_attachment</table>
<table>attachment</table>
</from>
<where>
<data_constraint>
<constraint>
<left_operand>TASK_ATTACHMENT.TASK_ID</left_operand>
<operator>eq</operator>
<right_operand>{TASK_ID}</right_operand>
</constraint>
<constraint>
<left_operand>TASK_ATTACHMENT.ATTACHMENT_ID</left_operand>
<operator>eq</operator>
<right_operand>{ATTACHMENT_ID}</right_operand>
</constraint>
</data_constraint>
<join_constraint>
<constraint>
<left_operand>task_attachment.attachment_id</left_operand>
<operator>left_outer</operator>
<right_operand>attachment.attachment_id</right_operand>
</constraint>
</join_constraint>
</where>
</hierarchy_select>
Regards,
Anupama Nagahawatta
Hey @AnupamaHN
I can’t see anything wrong with the sync rule.
Need to continue and investigate.
Do you see the attachment when you query the mobile DB?
Do you see it get into FSM DB table mm_message_out?
Cheers!
Hi @Shneor Cheshin
I see the attachment when I query for the ATTCHMENT table in the mobile but not when I query for TASK_ATTACHMENT.
Yes, I could see it in mm_message_out from the server end and got cleared out (assumed becuase it got synced successfully) didn’t see it in mm_message_in in the mobile
Cheers
@AnupamaHN
This is a tough one.
Maybe you overwrite the task - task_attachment relation def in custom metadata?
Sorry mate, I am out of ideas…
Cheers!