BE Question
 

BE Question

5 posts, 1 answered
  1. Roger Blanchard
    Roger Blanchard avatar
    413 posts
    Registered:
    29 Jun 2018
    01 Sep 2021
    Link to this post
    We have a BE with two tables...lets say Vendor (parent) and VendorProduct (child). There is a relation (one to many) between the two tables using the VendorNum for each table,

    In some situations the Child table will be filled when fetching a Vendor record. However, in other scenarios we would just be fetching VendorProduct records. Is there a way to determine in the BE if the VendorProduct is being filled due to the relation? I have tried using the DatasetHelper:ActiveRelationNames but always returns the defined relation.




  2. Mike Fechner
    Mike Fechner avatar
    342 posts
    Registered:
    14 Sep 2016
    01 Sep 2021 in reply to Roger Blanchard
    Link to this post
    Hi Roger, within the Business Entity in FetchData the FetchDataRequest argument is having a Tables propery. This contains the list of tables (comma-delimited) that are requested from the consumer (UI, DatasetModel, ...). 

    Is that what you're looking at? 

    Relations are usually always active, so that this won't help you further.
  3. Roger Blanchard
    Roger Blanchard avatar
    413 posts
    Registered:
    29 Jun 2018
    01 Sep 2021 in reply to Mike Fechner
    Link to this post
    Yes, this is exactly what I am looking for...THANK YOU!!

    Let me give this a try.
  4. Mike Fechner
    Mike Fechner avatar
    342 posts
    Registered:
    14 Sep 2016
    Answered
    01 Sep 2021 in reply to Mike Fechner
    Link to this post
    Great. In other methods within the Business Entity this is also available within the THIS-OBJECT:FetchDataRequest property.
  5. Roger Blanchard
    Roger Blanchard avatar
    413 posts
    Registered:
    29 Jun 2018
    01 Sep 2021 in reply to Mike Fechner
    Link to this post
    Works great...thanks again.
5 posts, 1 answered