0% found this document useful (0 votes)
103 views

Jdegtaddupdate - Image/ Jdegtaddupdate - Imagekeystr: Syntax

This function adds or updates an image record in the Media Object table (F00165). It takes parameters like the data structure name, a MODSKey or MOKeyStr containing the image data, a MODATA array with the data to update, and the number of elements in the array. It returns a result code. Sample code shows how to retrieve existing image data, pass it to this function to update, and free the memory.

Uploaded by

RaveRave
Copyright
© © All Rights Reserved
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
103 views

Jdegtaddupdate - Image/ Jdegtaddupdate - Imagekeystr: Syntax

This function adds or updates an image record in the Media Object table (F00165). It takes parameters like the data structure name, a MODSKey or MOKeyStr containing the image data, a MODATA array with the data to update, and the number of elements in the array. It returns a result code. Sample code shows how to retrieve existing image data, pass it to this function to update, and free the memory.

Uploaded by

RaveRave
Copyright
© © All Rights Reserved
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
You are on page 1/ 5

jdeGTAddUpdate_Image/

jdeGTAddUpdate_ImageKeyStr
Last Modified: B9 | October 2, 2020

This function will add or update image record type to the Media Object table
(F00165).

Syntax
JDERTN(JDEDB_RESULT) JDEWINAPI jdeGTAddUpdate_Image(PJSTR szObjectName,
LPVOID lpMODSKey,
LPMODATA pMOData,
long lTotalRec);
JDERTN(JDEDB_RESULT) JDEWINAPI jdeGTAddUpdate_ImageKeyStr(
PJSTR szObjectName,
PJSTR pszMOKeyStr,
LPMODATA pMOData,
long lTotalRec);

Parameters
Parameter Notes Usage
szObjectName Input/Required GT data structure name Primary unique
key
lpMODSKey Input/Required GT data structure with valid data. The
data within the GT data structure will be
formatted into a string used for TXKY
pszMOKeyStr Input/Required Formatted string used for TXKY
pMOData Input/Required Array of data structure that store the
data to be updated.
lTotalRec Input/Required Indicate number of array element exists
in pMOData

Return Value
Return Value Description
JDEDB_PASSED Return value if this API succeeds
JDEDB_FAILED Return value if this API fails

Example
Sample #1:

JDEDB_RESULT JDBReturn = JDEDB_PASSED;


LPMODATA pMOData = NULL;
long lTotalRec = 0;

JDBReturn = jdeGTGet_AllMOTypeKeyStr (_J(“ABGT”), _J(“1”), &pMOData, &lTotalRec);


if (JDBReturn == JDEDB_PASSED && pMOData && lTotalRec > 0)

493191925.doc 1
jdeGTAddUpdate_Image()/jdeGTAddUpdate_ImageKeyStr()

{
jdeGTAddUpdate_ImageKeyStr(_J(“ABGT”) , _J(“1”), pMOData, lTotalRec)
jdeFreeMOData(pMOData, lTotalRec)
}

return;

Sample #2:

JDEDB_RESULT JDBReturn = JDEDB_PASSED;


LPMODATA pMOData = NULL;
long lTotalRec = 0;
DSABGT dsABGT = {0};

ParseNumericString(&dsABGT.mnAddressNumber, _J(“1”));

JDBReturn = jdeGTGet_AllMOType(_J(“ABGT”), &dsABGT, &pMOData, &lTotalRec);


if (JDBReturn == JDEDB_PASSED && pMOData && lTotalRec > 0)
{
jdeGTAddUpdate_Image(_J(“ABGT”) , &dsABGT, pMOData, lTotalRec)
jdeFreeMOData(pMOData, lTotalRec)
}

return;

Additional Notes
 Parameter, pData, in MODATA must contain a valid pointer to update the
text or shortcut media object type.
 MODATA (or LPMODATA) Data Structure definition:
MODATA, *LPMODATA

Data Type Data Description Note


int nSeq Sequence number from
MOSEQN
MOTYPE nMOType Media Object Type
JCHAR szUser[11] User name
JDEDATE jdDate Date updated
MATH_NUMERIC mnTime Time updated
BOOL bRTFData TRUE = RTF Text
FALSE = Plain Text or others
JCHAR szItemName[GT_ITNM Item name
SIZE]
JCHAR szQueueName[GT_Q
UESIZE]
JCHAR szFileName[GT_FILES
IZE]
PJSTR pData Allocate memory for text and

B9 January, 20002 2
jdeGTAddUpdate_Image()/jdeGTAddUpdate_ImageKeyStr()

shortcut media object type.

 MOTYPE definition:

DEFINE TYPE NOTE


OBJ_JDEALL All Media Object Types
OBJ_RTFTEXT Text Media Object
OBJ_JDEIMAGE Image Media Object
OBJ_JDEOLE OLE Media Object
OBJ_MISCJDESHORTCUT Shortcut Media Object
OBJ_MISCIMAGEVENDOR Third party vendor
OBJ_MISCHTML HTML/URL/File Media Object

See Also

Related API’s Description


jdeGTGet_GenericText/ Retrieve text record type and convert any
jdeGTGet_GenericTextKeyStr RTF text to plain text
jdeGTGet_RTFText/ Retrieve text record type and and leave
jdeGTGet_RTFTextKeyStr RTF text as is.
jdeGTGet_ImageKey/ Retrieve image record type
jdeGTGet_ImageKeyStr
jdeGTGet_OLE/ Retrieve OLE record type
jdeGTGet_OLEKeyStr
jdeGTGet_Shortcut/ Retrieve shortcut record type
jdeGTGet_ShortcutKeyStr
jdeGTGet_Vendor/ Retrieve vendor record type
jdeGTGet_VendorKeyStr
jdeGTGet_HTML/ Retrieve HTML record type
jdeGTGet_HTMLKeyStr
jdeGTGet_AllMOType/ Retrieve ALL Media Object type based on
jdeGTGet_AllMOTypeKeyStr OBNM and TXKY
jdeGTAddUpdate_Text/ Update/Add the Media object record(s) of
jdeGTAddUpdate_TextKeyStr Text type
jdeGTAddUpdate_Image/ Update/Add the Media object record(s) of
jdeGTAddUpdate_ImageKeyStr Image type
jdeGTAddUpdate_OLE/ Update/Add the Media object record(s) of
jdeGTAddUpdate_OLEKeyStr OLE type

B9 January, 20002 3
jdeGTAddUpdate_Image()/jdeGTAddUpdate_ImageKeyStr()

jdeGTAddUpdate_Shortcut/ Update/Add the Media object record(s) of


jdeGTAddUpdate_ShortcutKeyStr Shortcut type
jdeGTAddUpdate_Vendor/ Update/Add the Media object record(s) of
jdeGTAddUpdate_VendorKeyStr Third party type
jdeGTAddUpdate_HTML/ Update/Add the Media object record(s) of
jdeGTAddUpdate_HTMLKeyStr HTML/URL type
jdeGTAddUpdate_AllMOType/ Update/Add the Media object record(s) of
jdeGTAddUpdate_AllMOTypeKeyStr ALL type
jdeGTAddUpdate_AllMOTypeWithLan Update/Add the Media object record(s) of
g ALL type with language
jdeGTDelete_Text/ Delete specific text record type.
jdeGTDelete_TextKeyStr
jdeGTDelete_AllText/ Delete all text record types for OBNM and
jdeGTDelete_AllTextKeyStr TXKY
jdeGTDelete_Image/ Delete specific image record type.
jdeGTDelete_ImageKeyStr
jdeGTDelete_AllImage/ Delete all image record types for OBNM
jdeGTDelete_AllImageKeyStr and TXKY
jdeGTDelete_OLE/ Delete specific OLE record type.
jdeGTDelete_OLEKeyStr
jdeGTDelete_AllOLE/ Delete all OLE record types for OBNM and
jdeGTDelete_AllOLEKeyStr TXKY
jdeGTDelete_Shortcut/ Delete specific Shortcut record type.
jdeGTDelete_ShortcutKeyStr
jdeGTDelete_AllShortcut/ Delete all Shortcut record types for OBNM
jdeGTDelete_AllShortcutKeyStr and TXKY
jdeGTDelete_Vendor/ Delete specific Vendor (Third Party) record
jdeGTDelete_VendorKeyStr type.
jdeGTDelete_AllVendor/ Delete all Vendor (Third Party) record types
jdeGTDelete_AllVendortKeyStr for OBNM and TXKY
jdeGTDelete_HTML/ Delete specific HTML/URL record type.
jdeGTDelete_HTMLKeyStr
jdeGTDelete_AllHTML/ Delete all HTML/URL record types for
jdeGTDelete_AllHTMLKeyStr OBNM and TXKY
jdeGTDelete_AllMOType/ Delete all record types for OBNM and
jdeGTDelete_AllMOTypeKeyStr TXKY
jdeValidateGTExist/ Validate if Media Object exist in F00165
jdeValidateGTExistWithKeyStr table

B9 January, 20002 4
jdeGTAddUpdate_Image()/jdeGTAddUpdate_ImageKeyStr()

jdeGTGetCount/ Get total number of the media object


jdeGTGetCountKeyStr
jdeGTFreeMOData Free the memory allocated for MODATA
structure

B9 January, 20002 5

You might also like