How to Update Extended Description for Sales Order and Purchase Order Line Items when creating orders using PVXCOM in Sage 100 ERP

By | April 26, 2012

In earlier versions of Sage 100 ERP aka Sage MAS 90/200 (i.e. before version 4.40), it was easy to add/update “Extended Description” by using the “CI_ExtendedDescription_BUS” object and then updating the “Extended Description” with the desired string in Sage 100 ERP.

From Sage 100 ERP version 4.40 onwards the “CI_ExtendedDescription_BUS” object is hidden and has no direct access to add/update Extended Descriptions. Using the Business Object model this object is now available as a Child object of Sales Order Lines and Purchase Order lines object. The below code snippet shows how you can access the object and Add/Update Extended Descriptions.

‘Get the Item Description
retVAL = oSOOrder.oLines.nGetValue(“ItemCodeDesc$”, ItemCodeDesc)
 
‘Create the Extended Description Object
objSoExtDesc = oSOOrder.oLines.oExtendedDescriptionBusiness
 
‘Get the Extended Description code
retVAL = oSOOrder.oLines.nGetValue(“ExtendedDescritpionKey$”, Key)
 
‘Create the object
Set obj = oSOOrder.oLines.oExtendedDescriptionBusiness
 
‘Create Update records
IfString.IsNullOrEmpty(Key) Then
‘Create new Extended Description
      Key = obj.sGetNextExtendedDescriptionKey()
      retVAL = obj.nSetKey(Key)
      retVAL = obj.nSetValue(“ExtendedDescriptionText$”, ItemCodeDesc & ” “ & ItemCodeDescription)
      retVAL = obj.nSetValue(“CreationModuleCode$”, “S/O”)
 
‘Insert the record
      retVAL = obj.nWrite()
 
Else
‘Update the existing one
      retVAL = obj.nSetKey(Key)
      retVAL = obj.nSetValue(“ExtendedDescriptionText$”, ItemCodeDesc & ” “ & ItemCodeDescription)
      retVAL = obj.nSetValue(“CreationModuleCode$”, “S/O”)
 
‘Update the record
      retVAL = obj.nUpdate()
EndIf
 
‘Update the Item Description
‘the Value of retVal would be -1 as it gives warning while settings the Description
retVAL = oSOOrder.oLines.nSetValue(“ItemCodeDesc$”, ItemCodeDesc & ” “ & ItemCodeDescription)
 
‘write the new detail line of the Sales Order
oSOOrder.oLines.nWrite()

About Us

Greytrix – a globally recognized and one of the oldest Sage Development Partners is a one-stop solution provider for Sage ERP and Sage CRM organizational needs. Being acknowledged and rewarded for multi-man years of experience and expertise, we bring complete end-to-end assistance for your technical consultations, product customizations, data migration, system integrations, third-party add-on development, and implementation competence.

The unique GUMU™ integration solutions provided by Greytrix for Sage 100 include Sage 100 integration with Sage CRM, and Salesforce.comDynamics 365 CRM, the migration solutions include Sage 100 Migration from Sage 50 USSage IntacctQuickBooks, Sage Business Vision and Sage Business Works. We also offer best-in-class Sage 100 customization and development services to Sage business partners, end users, and Sage PSG worldwide. Sage 100 product listings by Greytrix include Salesforce – Sage ERP integration available on Salesforce Appexchange, Dynamics 365 CRM – Sage ERP integration available on Microsoft Appsource (Free Trial).

The GUMU™ Cloud framework by Greytrix forms the backbone of cloud integrations that are managed in real-time for processing and execution of application programs at the click of a button.

For more details on Sage 100 Services, please contact us at sage@greytrix.com. We will like to hear from you.