PdcBaseMaterial.Load: Difference between revisions

From External Bemet Wiki
Jump to navigation Jump to search
Created page with "== Methods == pdcBaseMaterial.Load<br> Matno pdcBaseMaterial.Save<br> Price only boolean == Properties == pdcBaseMaterial.FixedStockPriceUnit<br> [[pdcBaseMateria..."
 
No edit summary
 
Line 1: Line 1:
== Methods ==
== Declaration ==
[[pdcBaseMaterial.Load]]<br> Matno
Load(MaterialNo as string) as Boolean
[[pdcBaseMaterial.Save]]<br> Price only boolean
 
== Properties ==
[[pdcBaseMaterial.FixedStockPriceUnit]]<br>
[[pdcBaseMaterial.GrossPurchPriceUnit]]<br>
[[pdcBaseMaterial.IsFixedStockPrice]]<br>
[[pdcBaseMaterial.NettPurchPriceUnit]]<br>


== Description ==
== Description ==
Interface for the basematerial object
Returns true or false whether the basematerial succesfully read with the supplied number.


== Notes ==
== Notes ==
Represents the Basematerial object.
This method read an existing basematerial.
With this object an extension manipulate a single base material.
The input parameter is a materialnumber.
 
== Code example ==
This code example opens material "ABC123", changes the nett purchase price unit to 50 and saves.


<source lang="vb">
<source lang="vb">

Latest revision as of 09:20, 10 January 2018

Declaration

Load(MaterialNo as string) as Boolean

Description

Returns true or false whether the basematerial succesfully read with the supplied number.

Notes

This method read an existing basematerial. The input parameter is a materialnumber.

dim objBaseMat
dim strMatNo

  strMatNo = "ABC123"
  set objBaseMat = pdc.MasterData.Material
  if objBaseMat.Load(strMatNo) then
    ObjBaseMat.NettPurchPriceUnit = 50
    if not objBaseMat.Save(true) then
      msgbox pdc.LastError
    end if
  else
    msgbox pdc.LastError
  end if

Availability

Available since Januari 2017 (From version 5.3)