locked
How to sync the master-detail data by filter? RRS feed

  • Question

  • there is a scope contain the master-detail table below:

    order:     OrderID, StoreID, MasterName

    detail:     DetailID, OrderID, DetailName

    the master-detail table has a lot data, so i defined a filter parameter

    serverTemplate.Tables["Sales.order"].FilterClause = "[side].[] = @StoreID";

     

    so the client get their own orders, but the detail table don't have StoreID column, how can i sync the detail table which belong the order table?

    Wednesday, May 25, 2011 8:57 AM

Answers

  • you would define a separate filter on the detail table similar to below:

    serverTemplate.Tables["Sales.detail"].FilterClause = "[side].[OrderID] IN ( select OrderID from Sales.order_tracking where StoreID = @StoreID)";

    • Marked as answer by Timwells Wednesday, May 25, 2011 9:28 AM
    Wednesday, May 25, 2011 9:07 AM

All replies

  • you would define a separate filter on the detail table similar to below:

    serverTemplate.Tables["Sales.detail"].FilterClause = "[side].[OrderID] IN ( select OrderID from Sales.order_tracking where StoreID = @StoreID)";

    • Marked as answer by Timwells Wednesday, May 25, 2011 9:28 AM
    Wednesday, May 25, 2011 9:07 AM
  • Thanks

     

    Wednesday, May 25, 2011 9:28 AM