Skip to main content

Load additional Item Information in performant way

Comments

2 comments

  • Daniel Ebi

    Hi Andre,
    I think you should create a query showing only the needed items for an document.
    As I understand correctly your UDT.Code should be the ItemCode.

    Then you can create the query like that:
    SELECT DISCTINCT T0.* FROM UDT T0 INNER JOIN @@RDR1 DL ON T0.Code = DL.ItemCode WHRE DL.DocEntry = [%DocEntry]

    - I used DISTINCT in case of having one ItemCode in more than one document line.
    - I used "@@RDR1", because coresuite designer replaces it with the right table e.g. rdr, dln, inv. With this way, you can use the same query in all documents.
    - I am not sure, but I think the paramter [%DocEntry] is standard in documents

    The result of this query should only deliver the itemcodes which are used in the document.

    Then you can link DocumentRow with your new qury by Link filed 1 ItemCode ans Linkfield 2 Code.

    I hope it works fine.

    Kind regards

    Daniel

    2
  • Andre Seiss

    Hi Daniel,

    thanks for your suggestion.
    I got it now working with proper speed by rewriting the Query to select based on DocEntry and use the auto linking by DocEntry. I don't use the Link Fields but instead defined a FilterExpression in the databand by DocumentRow ItemCode = ItemCode form my UDT.

    Thanks for your quick help
    Regards Andé

    0

Please sign in to leave a comment.