cancel
Showing results for 
Search instead for 
Did you mean: 

How to get Reference Doc from copy from button

Former Member
0 Kudos

Hi..

I would like to know if there is a way to get the source document or reference document number with-out sdk or add on development , if you used the copy from button to populate the data?

sample

in order entry you can populate the data by using the copy button then choose sales quotation, then using formatted search or select statement could i get the source documents (sales quotation number)..

thanks

Loren

Accepted Solutions (0)

Answers (4)

Answers (4)

Former Member
0 Kudos

thanks

Loren

Former Member
0 Kudos

The base document reference number are stored on the individual rows in the target docuement.

Look for the BaseRef and BaseEntry fields on each document row i.e. RDR1.

Hope this helps

paul_feeney
Explorer
0 Kudos

Hello Loren,

Since each line can have a different base document, we must reference the values in the row table.

You could use this formatted search for the AR Invoice form:

SELECT BaseEntry, BaseLine from INV1 WHERE DocEntry =  $[OINV.DocNum]

Regards,

Paul Feeney

SAP Business One Forums Team

Former Member
0 Kudos

Hi Paul

i tried your suggestion , but using the query it will work only if you save the document, what i need is to get the source docs after pressing/doing the copy from button or before saving the document.

thanks

loren

Former Member
0 Kudos

Hi Loren,

If you need to get the BaseRef field before saving the document you can use the screen reference in your query:

SELECT $[$38.44.0]

Just selects the BaseDocument reference number from a row. You may want to also use:

SELECT $[$38.43.0]

To get the Base Document Type (sales quotation, delivery etc.)

Bob Richardson

Former Member
0 Kudos

Hi

When you do copy from then it shows the Docnum of the base document in the remarks field of target document..

Thanks