PdcApplication.ActiveObjectID: Difference between revisions

From External Bemet Wiki
Jump to navigation Jump to search
No edit summary
No edit summary
 
Line 9: Line 9:


== Code example ==
== Code example ==
In userexit SCR_AFTERPROJECTFORMCLOSE create a folder for documents concerning this project.
In userexit SCR_AFTERDELIVERYNOTECLOSE create a folder for documents concerning this project.


<source lang="vb">
<source lang="vb">
dim strProjNr
dim strDelNoteNr
dim strFolderPath
dim strFolderPath


   strProjNr = pdc.ActiveObjectID
   strDelNoteNr = pdc.ActiveObjectID
   strFolderPath = pdc.Options.GetFilePath(pdcApplicationPath) & " & strProjNr
   strFolderPath = pdc.Options.GetFilePath(pdcApplicationPath) & "\" & strDelNoteNr


   fbooMakeDir(strFolderPath)
   'fbooMakeDir(strFolderPath)
</source>
</source>



Latest revision as of 12:40, 6 April 2017

Declaration

ActiveObjectID as String

Description

Returns the active object ID

Notes

The 'ActiveObjectID' property contains the identifying value of the active object in PdC.

Code example

In userexit SCR_AFTERDELIVERYNOTECLOSE create a folder for documents concerning this project.

dim strDelNoteNr
dim strFolderPath

  strDelNoteNr = pdc.ActiveObjectID
  strFolderPath = pdc.Options.GetFilePath(pdcApplicationPath) & "\" & strDelNoteNr

  'fbooMakeDir(strFolderPath)

Constants

For example some userexits and its key in the table below.
UserExit - ActiveObjectID
SCR_AFTERMATERIALPASTE - MaterialNo (LM_MATN)
SCR_AFTERPURCHASEORDERLINEPASTE - PurchaseorderlineID (IN_ID)
SCR_AFTERASSIGNPURCHASELINECONNECTION - CombiID (IN_KOPPELID)
SCR_AFTERINVOICESAVE - InvoiceNo (INF_NR)
SCR_AFTERINVOICECLOSE - InvoiceNo (INF_NR)
SCR_BEFOREPRINTINVOICE - InvoiceNo (INF_NR)
SCR_AFTERDELIVERYNOTECLOSE - DeliverynoteNo (PB_NR)
SCR_BEFOREPRINTDELIVERYNOTE - DeliverynoteNo (PB_NR)
SCR_BEFOREPRNDELIVNF7 - DeliverynoteNo (PB_NR)
SCR_AFTERPURCHASEORDERCLOSE - PurchaseorderNo (BK_NR)
SCR_AFTERPRINTPURCHASEORDERNOTE - PurchaseorderNo (BK_NR)
SCR_AFTERPROJECTFORMCLOSE - ProjectNo (DF_NR)
SCR_AFTERCREATEPURCHASEORDERLINE - PurchaseorderlineID (IN_ID)
SCR_AFTERINCOMINGGOODS - Incominggoods ID (ING_AUTOID)
SCR_AFTERASSIGNCOMBIID - CombiID (DO_CMBID)
SCR_AFTERREPORTFINISHEDPRODUCTS - ProductReportID (FM_ID)

Availability

Available since December 2004 (From version 2.5).