OpenSync

Home Forums OpenSync Identifying new ID after syncing

This topic contains 8 replies, has 4 voices, and was last updated by  jcdelacruz 1 week, 1 day ago.

Viewing 9 posts - 1 through 9 (of 9 total)
  • Author
    Posts
  • #62365

    cfuller
    Participant

    I am designing a web app that will sync to Quickbooks using OpenSync. I have it setup so that the web app is inserting to the ‘bill’ and ‘txnexpenselinedetail’ tables, and is working great.

    Now I need to update the link between my web app and the Synced database so I can do things like check if it has been paid yet.

    I don’t see anything in the documentation that indicates how I can map the temporary IDKEY that I use to do the insert to the new TxnID/IDKEY after syncing. I suppose I could search for various fields (i.e. vendor, amount, date, etc.) to match, but it would be great if I could just lookup what the new IDKEY is is for the temporary one I entered, and I can’t seem to find that anywhere.

    Thanks in advance!

    #62367

    IDKEY will storage TxnID value, so you will be able to link both tables. I hope I answered your question.
    Best Regards,

    #62368

    cfuller
    Participant

    Yes, I understand that. So when I “ADD” the item to the database to sync with Quickbooks, I assign a random ID number and put it in the TxnID field for the bills table, and in the IDKEY field on the expense table. After Open Sync syncs with Quickbooks that random number is replaced by an ID number generated by Quickbooks.

    I want to know if there is a way I can search, after the sync, for the old random id number I generated to find out what the exact new TxnID is, so I can replace the link in my webapp’s database to make sure that the bill and the transaction in my web app are still linked together.

    Thanks.

    #62369

    All the parent tables have a field called “UserData” which will be preserved. You can use that one in order to link your tables.

    #62370

    cfuller
    Participant

    Fantastic, thank you!

    #62371

    you are very welcome

    #62394

    cfuller
    Participant

    Good Afternoon,

    I’ve started testing and trying to get this to work, however, I’m finding it is not. I set the UserData equal to the random id that I also put into the TxnID. After I sync, the UserData field comes back as NULL (As do the CustomFields, which I had set data to). Is there something special I need to do force Open Sync to leave the UserData in place?

    Any other options I can try?

    Thanks!

    #62402

    Yair
    Participant

    cfuller I use the field “Memo” or POnumber to store information.

    so for example I create an Invoice.. with a random id let say
    ‘MZ3i3m3i’
    in the Memo I put AT:MZ3i3m3i this way once invoice number is generated by the quickbooks API.
    I will be able to locate the transaction by search for the “AT:MZ3i3m3i” in Memo.

    #62412

    jcdelacruz
    Participant

    i have the same problem that cfuller.

    I’ve started testing and trying to get this to work, however, I’m finding it is not. I set the UserData equal to the random id that I also put into the TxnID. After I sync, the UserData field comes back as NULL (As do the CustomFields, which I had set data to).

Viewing 9 posts - 1 through 9 (of 9 total)

You must be logged in to reply to this topic.