cancel
Showing results for 
Search instead for 
Did you mean: 

How to set "CopyToTargetDoc" in Attachments to No when "CopyAttachmentsFromBaseToTarget" equals Yes?

josedvm
Participant
0 Kudos

Hi,

I need to attach a file to a marketing document but it should not be copied to target documents.

In the UI you can uncheck the checkbox when the setting at company level is checked, but using the value tNO via Service Layer or DI API does not seem to work, neither in attachment creation or in an update operation.

However, when the company setting is set to No, you can set CopyToTargetDoc to Yes as expected.

Here you have a sample payload for Attachments2 endpoint. CopyToTargetDoc is stored as tYES.


{
    "Attachments2_Lines": [
        {
            "FileExtension""txt",
            "FileName""Prueba_adjunto",
            "SourcePath""C:\\Users\\jdelviso\\Desktop",
            "CopyToTargetDoc""tNO"
        }
    ]
}
 
System info:
 
SAP Business One 10.0 version for SAP HANA (10.00.180) FP 2111 (64-bit)

Accepted Solutions (0)

Answers (0)