SmartViewer:AddRecord
 

SmartViewer:AddRecord

4 posts, 1 answered
  1. Roger Blanchard
    Roger Blanchard avatar
    381 posts
    Registered:
    29 Jun 2018
    17 Dec 2018
    Link to this post
    I am calling AddRecord in my SmartViewerControl from my Parent SmartWindow instead of having the user click add on the toolbar. The user will be scanning product and if the record is not found we will create on the fly. After calling AddRecord what is the best way to assign fields in the TT? I do not seem to have access to the TT. I know I can add a PUBLIC METHOD in the SmartViewer and call it from the SmartWindow but I wanted to see if there was something already built into the framework.

    Thanks in advance.

     
  2. Mike Fechner
    Mike Fechner avatar
    319 posts
    Registered:
    14 Sep 2016
    Answered
    17 Dec 2018 in reply to Roger Blanchard
    Link to this post
    The BeforeCreateRecord event of the SmartBusinessEntityAdapter is the recommended approach. The event argument (https://help.consultingwerkcloud.com/smartcomponent_library/117_64/Consultingwerk.SmartComponents.Implementation.BeforeCreateRecordEventArgs.html) provides access to the buffer handle of the new record and allows to modify field values before shown on the UI. 
  3. Roger Blanchard
    Roger Blanchard avatar
    381 posts
    Registered:
    29 Jun 2018
    17 Dec 2018 in reply to Mike Fechner
    Link to this post
    Just what I was looking for. I will give it a try...thanks
  4. Roger Blanchard
    Roger Blanchard avatar
    381 posts
    Registered:
    29 Jun 2018
    17 Dec 2018 in reply to Mike Fechner
    Link to this post
    Yep, that works great!!!

    thanks again.
4 posts, 1 answered