EDIT: Fixed in Advanced Pack 1.18.0
When you request the merge-fields for a list, you do not specify the count parameter, which means only 10 are returned. If a list uses more than 10, then your check on whether the Espo fields are present breaks.
I would suggest setting count to 100 which is more than the maximum possible number of fields (80).
When you request the merge-fields for a list, you do not specify the count parameter, which means only 10 are returned. If a list uses more than 10, then your check on whether the Espo fields are present breaks.
I would suggest setting count to 100 which is more than the maximum possible number of fields (80).