Page 1 of 1

plugin code for V6 Manufacturing Requistions

PostPosted: Fri Feb 13, 2015 10:23 am
by dimuthu
Could you please provide me a sample plugin code for the following V6 "Manufacturing Requistions - Save Request" breakout.

Dim SerialNo
Dim TotalReqdQty
Dim oLine
Dim LineKey

If BatchObject.BillProduction <> 1 Then
SerialNo = VBFormObject.txtreference.text
LineKey = VBFormObject.grdSerialBill.Text("LineKey",1)
TotalReqdQty = VBFormObject.grdbase.text("QTY",1)
If LineKey = "" Then
LineKey = BatchObject.m_Lines.Item(1).m_oBoMs.Item(1).m_oLineDetails.AddNoObject()
End If
Set oLine = BatchObject.m_Lines.Item(1).m_oBoMs.Item(1).m_oLineDetails.Item(LineKey)
oLine.QtyTaken = TotalReqdQty
oLine.QtyIntoStock = TotalReqdQty
oLine.SerialNo = SerialNo
End If
End Sub

Regards
Dimuthu

Re: plugin code for V6 Manufacturing Requistions

PostPosted: Wed Feb 18, 2015 11:48 am
by Mike.Sheen
Hi Dimuthu,

Can you explain what it is that breakout is intended to do? I thought it looked as though it was to set the output items serial number to be the MR's reference, but when I pasted that snippet into 6.5.13 and made a new MR, saved and activated and the output item's serial number was not set to the MR's reference.

Mike

Re: plugin code for V6 Manufacturing Requistions

PostPosted: Wed Feb 18, 2015 3:08 pm
by dimuthu
Hi Mike,

Could you please see the attached screen shot.

Regards
Dimuthu

Re: plugin code for V6 Manufacturing Requistions  Topic is solved

PostPosted: Sun Feb 22, 2015 10:37 am
by Mike.Sheen
Hi dimuthu,

The attached plugin will set the serial number of the output items upon closing of the order - this results in the SOH records created also having that serial no. as well.

Plugin Work Orders - set output serial number.xml
Sample Plugin
(32.05 KiB) Downloaded 114 times


Mike

Re: plugin code for V6 Manufacturing Requistions

PostPosted: Mon Feb 23, 2015 1:23 pm
by dimuthu
Thanks Mike.

Re: plugin code for V6 Manufacturing Requistions

PostPosted: Mon Feb 23, 2015 2:54 pm
by dimuthu
Hi Mike,

I copied the plugin code you sent me. There is a compilation error because of some invalid characters in the "IF" clause ( Please see attached screen shot ). Should it be "<>" ?

Regards
Dimuthu

Re: plugin code for V6 Manufacturing Requistions

PostPosted: Mon Feb 23, 2015 4:36 pm
by Mike.Sheen
dimuthu wrote:Hi Mike,

I copied the plugin code you sent me. There is a compilation error because of some invalid characters in the "IF" clause ( Please see attached screen shot ). Should it be "<>" ?

Regards
Dimuthu


Hi Dimuthu,

How did you get the code into the plugin? Did you use the import from XML option? You need to import the plugin to deal with the code correctly - you can't copy + paste the contents or the escaped data will not be treated correctly.

Mike

Re: plugin code for V6 Manufacturing Requistions

PostPosted: Mon Feb 23, 2015 4:54 pm
by dimuthu
Thanks Mike. Did the XML import. All good.

Regards
Dimuthu