Just have a look at how other C++ BSFNs get and handle the text and clone the BSFNs.
Don't buy anything to do that, get under the covers yourself. Alex, come on. Help the guy rather than sell stuff.
I hope this helps...and it's free
jdeGTGet_GenericText/ jdeGTGet_GenericTextKeyStr
Last Modified: B9 | March 14, 2017
This function will retrieve the text record type from the Media Object table (F00165). Once the record(s) is retrieved, the RTF text is converted to plain text.
Syntax
JDERTN(JDEDB_RESULT) JDEWINAPI jdeGTGet_GenericText (
PJSTR szObjectName,
LPVOID lpMODSKey,
int nSeq,
LPMODATA pMOData,
long lTotalRec);
JDERTN(JDEDB_RESULT) JDEWINAPI jdeGTGet_GenericTextKeyStr(
PJSTR szObjectName,
PJSTR pszMOKeyStr,
int nSeq,
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
nSeq Input
pMOData Output Array of data structure that store the data to be deleted.
lTotalRec Output 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_GenericTextKeyStr (_J(“ABGT”), _J(“1”), 0, &pMOData, &lTotalRec);
if (JDBReturn == JDEDB_PASSED && pMOData && lTotalRec > 0)
{
jdeGTDelete_TextKeyStr(_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_GenericText(_J(“ABGT”), &dsABGT, 0, &pMOData, &lTotalRec);
if (JDBReturn == JDEDB_PASSED && pMOData && lTotalRec > 0)
{
jdeGTDelete_Text(_J(“ABGT”) , &dsABGT, pMOData, lTotalRec);
jdeFreeMOData(pMOData, lTotalRec);
}
return;
Additional Notes
• 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_ITNMSIZE] Item name
JCHAR szQueueName[GT_QUESIZE]
JCHAR szFileName[GT_FILESIZE]
PJSTR pData Allocate memory for text and 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/ jdeGTGet_GenericTextKeyStr Retrieve text record type and convert any RTF text to plain text
jdeGTGet_RTFText/ jdeGTGet_RTFTextKeyStr Retrieve text record type and and leave RTF text as is.
jdeGTGet_ImageKey/
jdeGTGet_ImageKeyStr Retrieve image record type
jdeGTGet_OLE/
jdeGTGet_OLEKeyStr Retrieve OLE record type
jdeGTGet_Shortcut/
jdeGTGet_ShortcutKeyStr Retrieve shortcut record type
jdeGTGet_Vendor/
jdeGTGet_VendorKeyStr Retrieve vendor record type
jdeGTGet_HTML/
jdeGTGet_HTMLKeyStr Retrieve HTML record type
jdeGTGet_AllMOType/
jdeGTGet_AllMOTypeKeyStr Retrieve ALL Media Object type based on OBNM and TXKY
jdeGTAddUpdate_Text/
jdeGTAddUpdate_TextKeyStr Update/Add the Media object record(s) of Text type
jdeGTAddUpdate_Image/ jdeGTAddUpdate_ImageKeyStr Update/Add the Media object record(s) of Image type
jdeGTAddUpdate_OLE/ jdeGTAddUpdate_OLEKeyStr Update/Add the Media object record(s) of OLE type
jdeGTAddUpdate_Shortcut/ jdeGTAddUpdate_ShortcutKeyStr Update/Add the Media object record(s) of Shortcut type
jdeGTAddUpdate_Vendor/ jdeGTAddUpdate_VendorKeyStr Update/Add the Media object record(s) of Third party type
jdeGTAddUpdate_HTML/
jdeGTAddUpdate_HTMLKeyStr Update/Add the Media object record(s) of HTML/URL type
jdeGTAddUpdate_AllMOType/
jdeGTAddUpdate_AllMOTypeKeyStr Update/Add the Media object record(s) of ALL type
jdeGTAddUpdate_AllMOTypeWithLang Update/Add the Media object record(s) of ALL type with language
jdeGTDelete_Text/ jdeGTDelete_TextKeyStr Delete specific text record type.
jdeGTDelete_AllText/ jdeGTDelete_AllTextKeyStr Delete all text record types for OBNM and TXKY
jdeGTDelete_Image/ jdeGTDelete_ImageKeyStr Delete specific image record type.
jdeGTDelete_AllImage/ jdeGTDelete_AllImageKeyStr Delete all image record types for OBNM and TXKY
jdeGTDelete_OLE/ jdeGTDelete_OLEKeyStr Delete specific OLE record type.
jdeGTDelete_AllOLE/ jdeGTDelete_AllOLEKeyStr Delete all OLE record types for OBNM and TXKY
jdeGTDelete_Shortcut/ jdeGTDelete_ShortcutKeyStr Delete specific Shortcut record type.
jdeGTDelete_AllShortcut/ jdeGTDelete_AllShortcutKeyStr Delete all Shortcut record types for OBNM and TXKY
jdeGTDelete_Vendor/ jdeGTDelete_VendorKeyStr Delete specific Vendor (Third Party) record type.
jdeGTDelete_AllVendor/ jdeGTDelete_AllVendortKeyStr Delete all Vendor (Third Party) record types for OBNM and TXKY
jdeGTDelete_HTML/ jdeGTDelete_HTMLKeyStr Delete specific HTML/URL record type.
jdeGTDelete_AllHTML/ jdeGTDelete_AllHTMLKeyStr Delete all HTML/URL record types for OBNM and TXKY
jdeGTDelete_AllMOType/ jdeGTDelete_AllMOTypeKeyStr Delete all record types for OBNM and TXKY
jdeValidateGTExist/ jdeValidateGTExistWithKeyStr Validate if Media Object exist in F00165 table
jdeGTGetCount/ jdeGTGetCountKeyStr Get total number of the media object
jdeGTFreeMOData Free the memory allocated for MODATA structure