Skip to Content

Copy UDF value from Orders to Invoices

Hi all,

I need to do the following:

The user has one UDF in marketing documents called NAlb. It is filled in the sales orders.

In invoices, the user uses the sales orders button to select several orders related to a customer and create a single document. I need to carry NAlb´s values from each sales order into the NAlb UDF in the invoice.

I have tryed several event, without any succedd. et_CLICK event in the "Sales Orders" button happens before the wizard is shown (for both BeforeAction values).

With the et_ITEM_PRESSED event, the ActionSuccess parameter is never true, and when BeforeAction becomes false the wizard has just started.

I have tryed the et_DATASOURCE_LOAD and et_MATRIX_LOAD too but they are not fired.

I have tryed the et_VALIDATE event for the matrix columns too, but it is not fired.

Could someone give me an approach to get this problem solved? Any advice is wellcome too.

Thanks in advance,

Ibai Peñ

Add a comment
10|10000 characters needed characters exceeded

Related questions

1 Answer

  • Best Answer
    author's profile photo Former Member
    Former Member
    Posted on Mar 02, 2005 at 09:02 AM

    Hello Ibai,

    Why dont you catch the event when the user selects the orders he wants to add?

    If pVal.FormType = "10016" And pVal.ItemUID = "1" And pVal.BeforeAction = False Then

    oForm = B1_Application.Forms.ActiveForm

    End If

    Then you can get the document number form the matrix of the form and load the Nalb.



    Add a comment
    10|10000 characters needed characters exceeded

    • Thanks Felipe,

      I have already solved.

      I use the event et_CLICK in the "Select" button in the the form you say. I loop throw all selected orders, and save the UDF values into variables.

      Then I catch the invoice form activate event, when the variables are not empty. Then I paste the values, and clear the variables.


      Ibai Peñ

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.