Hi everyone,
I want to run a popup page from the Sales Order page when entering a Sell-to Customer No.
In this page I can fill in some fields (Adress, "Address 2", "Post Code", etc.) and when I click OK the values I entered in the popup will be in the Sales Header(the values from Customer table are not taken).
I created a list page with the fields I need from table 36 and
set the property SourceTableTemporary to Yes.
In the
OnOpenPage trigger I placed the following code:
IF INSERT THEN;
I added a function executed in page Sales Order when entering a Sell-to Customer No with the following code:
CLEAR(pageXXX);
pageXXX.SETTABLEVIEW(Rec);
pageXXX.SETRECORD(Rec);
pageXXX.LOOKUPMODE :=TRUE;
pageXXX.RUNMODAL;
When I get the popup page, I fill in some data and click OK, there is no error message or so but the Sales Order is not modified.
What shall I change in my code to get the result I need?
Thanks in advance
Answers
1.) I don't really get why you would want to do this at all. You can still enter all the adresses, ... if you need them to be different from the Customer Values.
2.) If you really have a legit reason to do this, you've got to assign the values from the temporary Record directly into the physical one. Right now you are just filling a tempRecord which doesn't have any effect on the real record you want to change.
and leave out the setrecord, it doesnt do anything in your case
Thanks