Dear folks, I think this is easy for experts. I've create a new form that brings a "Contact Nº" and the "Customer No" asociates. Then, from this form I want to create a sales quote . I put a button with a PushAction and the following options:
PushAction: RunObject
RunObject: Form Sales Quote
RunFormLink: Sell-to Customer No.=FIELD("Customer No.")
RunFormLinkType: OnUpdate
"Customer No." is the field from my new form.
Well, on push the button it goes to the customer quotes, but it doesn't insert a new one. ¿which is what I need?.
Thanks in advance
0
Comments
Should be something like this... quickly coded, errors possible...
lrecSalesQuote.VALIDATE("Sell-to Customer No.",codCustomer);
Then it insert a new Quote but doesn't put the customer number neither the other fields. Any idea please?
Thanks.
Should work :?
Thanks.
remove that line..we use something similar below & it works.
OnPush()
RECSALESHEADER.INIT;
RECSALESHEADER."Document Type" := RECSALESHEADER."Document Type"::Order;
RECSALESHEADER.VALIDATE("Sell-to Customer No.",'blah blah');
RECSALESHEADER.INSERT(TRUE);
SETFILTER("No.",RECSALESHEADER."No.");
CurrForm.SalesLines.ACTIVATE;
CLEAR(RECSALESHEADER."Document Type");
CLEAR(RECSALESHEADER."No.");
http://www.BiloBeauty.com
http://www.autismspeaks.org
"Never memorize what you can easily find in a book".....Or Mibuso
My Blog
RECSALESHEADER.INIT;
RECSALESHEADER.VALIDATE("Document Type",cabventa."Document Type"::Quote);
RECSALESHEADER."No." := '';
RECSALESHEADER.INSERT(TRUE);
RECSALESHEADERVALIDATE("Sell-to Customer No.","Customer No.");
RECSALESHEADER.MODIFY(TRUE);
formsales.SETRECORD(RECSALESHEADER);
formsales.RUN;
Thanks everybody for help and time.