Salesperson Code

alien251alien251 Member Posts: 80
When I create a SO and assign a customer that has a Salesperson Code that Salesperson Code is applied to the order. Can someone tell me where in the code this occurs, I need to add a Customer Service Account Manager field to the Customer and Sales Header table and have the same behavior when creating sales orders.

Thanks,

Dan

Answers

  • damirdamir Member Posts: 28
    Hi Dan,

    code that updates Salesperson Code on Sales Order is in the trigger "Bill-to Customer No. - OnValidate()" on table "Sales Header".

    Hope this helps,

    Damir
  • jversusjjversusj Member Posts: 489
    dan,
    something i find to be very helpful when trying to find where code is being called is to use the Code Coverage tool.

    Go to tools > debugger > code coverage. Start.

    do your process (create your order in this case).
    navigate to code coverage form and press stop. click on first object and click 'code' button. click 'show all' and you are now looking at all code in all objects called during your process. then search for the field you are interested in. look for black text (red text is code that wasn't called). you can them zoom on the line that interests you to see what object it comes from. you can also scroll around to see what trigger that code falls under.

    i use it a lot when i'm looking to see how nav does something.
    kind of fell into this...
  • alien251alien251 Member Posts: 80
    Good information! Thanks, I'll be checking into that for sure...

    Dan
Sign In or Register to comment.