Pulling parent/child records from host
Posted: Sun Apr 15, 2012 5:17 pm
Because your documentation is very good, integrating GoZync into my app has been pretty straightforward, however there is one issue that I can't resolve.
I'm pulling down three contacts. Each contact has two phones that are in a related phones table. I can see that after the pull data from host script is run, the variable $data has the correct contact and phone data. When stepping through the scripts, the Set GoZyncContact fields ($data) creates the three contact records, but when the phone records are created in Set GoZyncPhones, they cause a blank record in contacts to be created. The result is that I have the correct number of phone records, but there are 9 contact records (the 3 for the actual contacts and 6 blanks for the six phone records that are created).
In the demo file in the GoZyncConnnector Invoices and InvoiceLineItems are connected directly to GoZync, but in the Mobile file they have a parent/child linkage in which only GoZyncInvoices are connected to GoZync. I have three parts tables that have parent/child relations. They are GoZyncing correctly, but they only go one way, like the invoices/line items in the demo.
I'm probably missing something obvious, but I'm also wondering if it wouldn't be helpful if the demo were constructed so there were parent/child tables making the full loop, like I'm trying to do with contacts & phones.
I hope this makes sense and is sufficient information for you to explain the solution to the extra contact records I'm getting.
Thanks,
Will
I'm pulling down three contacts. Each contact has two phones that are in a related phones table. I can see that after the pull data from host script is run, the variable $data has the correct contact and phone data. When stepping through the scripts, the Set GoZyncContact fields ($data) creates the three contact records, but when the phone records are created in Set GoZyncPhones, they cause a blank record in contacts to be created. The result is that I have the correct number of phone records, but there are 9 contact records (the 3 for the actual contacts and 6 blanks for the six phone records that are created).
In the demo file in the GoZyncConnnector Invoices and InvoiceLineItems are connected directly to GoZync, but in the Mobile file they have a parent/child linkage in which only GoZyncInvoices are connected to GoZync. I have three parts tables that have parent/child relations. They are GoZyncing correctly, but they only go one way, like the invoices/line items in the demo.
I'm probably missing something obvious, but I'm also wondering if it wouldn't be helpful if the demo were constructed so there were parent/child tables making the full loop, like I'm trying to do with contacts & phones.
I hope this makes sense and is sufficient information for you to explain the solution to the extra contact records I'm getting.
Thanks,
Will