Method Community

 

SQL Query

Last post 03-27-2015 11:17 AM by furrywombat. 2 replies.
Page 1 of 1 (3 items)
Sort Posts: Previous Next
  • 03-27-2015 8:15 AM

    SQL Query

    Hey Guys,

    I was wondering if it is possible for form a query with a join clause. I'm trying to prepare a function that seeks out transaction line entries that do not refer to any primary transaction. For most transaction lines this is easy... we just query where LinkToPrimaryTable (i.e. SalesOrder, Invoice, etc) IS NULL or = ''. But when an item receipt is converted to a bill in QuickBooks, it deletes the item receipt in Method but not the item receipt lines. Currently, we're flagging these by downloading a record id list from the ItemReceipt table and looping through the ItemReceiptLine entries comparing ItemReceiptRecordID against an ItemReceipt record id array. But if there was a way to get this all done with a single query, I think it would be best.

    Possible?

    Thanks in advance.

    FW

  • 03-27-2015 9:30 AM In reply to

    Re: SQL Query

    Furry

    one possible solution is to flatten the table by adding the fields as method "linked fields".  this has worked well for us.

    Mark Crews
    Cloud Consultancy
    Principal and Developer


    • 2012 MethodCRM Partner of the Year

    • 2012 MethodCRM Community Excellence Award

    • 2011 MethodCRM Community Excellence Award


    Visit our website to find out about our training, support, and customization services.
    website: cloudconsultancyllc.com
    blog: cloudconsultancyllc.com/blog/
    ph: 434.326.1601
    e: support@cloudconsultancyllc.com

    What is Method?
  • 03-27-2015 11:17 AM In reply to

    Re: SQL Query

    Oh man, I can't believe I missed that. We have hundreds of linked fields... didn't think to use them for this particular purpose. Thanks!

Page 1 of 1 (3 items)