Orders Linked Together - Modifying Qty

Hi guys,

I am getting this issue with one of my client.

The client entered a sales order which is linked to a purchase order. He now wants to change the quantities but it’s currently not possible. There is that message coming up saying " You cannot modify this quantity because the order line is associated to the order No. 123456789 line 10000". When i tried changing the qty in the purchase order i got a similar message saying cannot change this qty as this PO is linked to SO No. XXXXXX

Any idea what might be the issue?

The orders are linked so you can’t change them. I believe you can add a new line to the PO and then link it to the SO. Or you can unlink them, change the quantity and then re-link them.

Hi Matt

How can i unlink the orders ?

Cheers

On the sales Line you should see “Purchase Order No.” & “Purchase Order Line No.”

clear these fields and it won’t be associated with the PO anymore

& if you look at the PO you will see “Sales Order No.” & “Sales Order Line No.”

clear these fields and it won’t be associated with the SO anymore.

They might not be visible - you’ll have to show them. If they are not there you’ll have to add them (Designer->Drop them in)

we Use Special Orders Alot so I created a Clear associtations button on the SO form. to do this for me!

OnPush()
IF NOT DIALOG.CONFIRM(‘Would you like to Clear the Purchase Order Fields?’,TRUE)
THEN EXIT ELSE
SalesLine.RESET;
SalesLine.SETRANGE(“Document Type”,“Document Type”);
SalesLine.SETRANGE(“Document No.”,“No.”);
IF SalesLine.FIND(’-’) THEN REPEAT
ClearPurchaseLineSO;
ClearSalesLinePO;
UNTIL SalesLine.NEXT = 0;

Added Some Functions…Note; clear the purch line first else you’ll have no data for the GET to use :slight_smile:

ClearPurchaseLineSO()
IF Purchline.GET(“Document Type”,SalesLine.“Special Order Purchase No.”,SalesLine.“Special Order Purch. Line No.”)
THEN BEGIN
CLEAR(Purchline.“Special Order Sales No.”);
CLEAR(Purchline.“Special Order Sales Line No.”);
Purchline.MODIFY(TRUE);
END;
ClearSalesLinePO()
CLEAR(SalesLine.“Special Order Purchase No.”);
CLEAR(SalesLine.“Special Order Purch. Line No.”);
SalesLine.MODIFY(TRUE);

You’ll have to edit
IF Purchline.GET(“Document Type”,SalesLine.“Special Order Purchase No.”,SalesLine.“Special Order Purch. Line No.”)
to point to the “Purchase Order No” & “Purchase Order Line No.” instead of special Order…fields