PdcCalculation.ReadFormArticle: Difference between revisions

From External Bemet Wiki
Jump to navigation Jump to search
Created page with "== Declaration == == Description == == Notes == == Code example == <source lang="vb"> </source> == Availability =="
 
No edit summary
 
Line 1: Line 1:
== Declaration ==
== Declaration ==
 
ReadFromArticle(ArticleID as String) as Boolean


== Description ==
== Description ==
 
Read an article in the calculation


== Notes ==
== Notes ==
This method reads a calculation of a standard article into the current calculation object.


BEWARE; Beware that the save method in this case does NOT change the standard calculation but only the current calculation object.


== Code example ==
== Code example ==
 
This code example creates a new calculation, reads a standard calculation into it, changes the production quantity and saves it.


<source lang="vb">
<source lang="vb">
dim objCalc


  set objCalc = pdc.NewCalculation
  if objCalc.ReadFromArticle("1234") then
    objCalc.OrderQuantity = 3
    objCalc.Save
    objCalc.Show
  else
    msgbox "Could not read article"
  end if
</source>
</source>


== Availability ==
== Availability ==

Latest revision as of 08:37, 21 May 2012

Declaration

ReadFromArticle(ArticleID as String) as Boolean

Description

Read an article in the calculation

Notes

This method reads a calculation of a standard article into the current calculation object.

BEWARE; Beware that the save method in this case does NOT change the standard calculation but only the current calculation object.

Code example

This code example creates a new calculation, reads a standard calculation into it, changes the production quantity and saves it.

dim objCalc

  set objCalc = pdc.NewCalculation
  if objCalc.ReadFromArticle("1234") then
    objCalc.OrderQuantity = 3
    objCalc.Save
    objCalc.Show
  else
    msgbox "Could not read article"
  end if

Availability