Caveats & Gotchas
Fields are mapped but Not set during Import
Scenario
A field is mapped in IMan but the value is never set to the resulting record/transaction.
Cause
The most probable cause is object code logic is overriding the field mapping.
Example
When creating an (SOH) Order the Order, Billing or Delivery address by default always revert to the saved, default address for the Customer.
The reason, the global variable GACTSAD (Activity code "SAD" systematic Storage of addresses) is forced to a value which triggers the default address to be copied to the order, irrespective of any value set through webservices.
An excerpt from the SUBSOH $OUVRE function shows GACTSAD variable being set to 2 only in webservices mode (we don’t know why) where the original value of the variable (GACTSAD) is saved to another local variable where it’s restored after the database transaction is committed.
If dim(GWEBSERV)=1 & GWEBSERV=1
.
.
#----- Gestion des adresses
Local Integer SAVGACTSAD : SAVGACTSAD=GACTSAD : GACTSAD=2
.
.
Endif
The value of GACTSAD is checked within the execution of the CHARGENTENTE subprogram called from the INICRE method. Where the value is set to ‘2’, the Address Screen is reloaded (CHARGE_ADRMASK) with the default address from the Sold-To customer.
If GACTSAD=2 & find([M:ADB1]ADBFLG,0,1) Call CHARGE_ADRMSK("ADB1", [F:SOH]BPCORD) From TRTVENDIV : Endif : # Bug 67868
The same logic performed for the Billing and Delivery addresses.
To resolve, the default functionality must be overridden. The recommended approach is to perform the override in the Special Processing program for the object.
The following excerpt from SPESOH illustrates how to achieve this.
# Mask Management SOH4 (Specific)
$ACTION
Case ACTION
When "INICRE" : Gosub INICRE
When "CREATION" : Gosub CREATION
Endcase
Return
#Swap out the logic
$INICRE
If GWEBSERV
#Ensure the variable is not already defined.
Local Integer SPESAVGACTSAD : SPESAVGACTSAD = GACTSAD : GACTSAD = 1
Endif
Return
#Restore the logic after the transaction is complete.
$CREATION
If GWEBSERV
GACTSAD = SPESAVGACTSAD
Endif
Return
object code Changes not are always Immediate
Occasionally the changes in either the object code do not always propagate to the webservice for execution. When this occurs, restart the SageX3 Apache Http Daemon/Windows Service.
Too Many Published Fields
When attempting to publish certain objects you may receive the following error.
This error is caused when the number of variables for a particular object exceeds 65,000. The variable count includes all tables, screens & additional screens referenced for the object. This count includes dimensional fields, where some fields internally can have up to 300 dimensions.
This error is particularly prevalent with the Sales Order (SOH) object. In this case, it is relatively easy to resolve by creating a new Transaction Entry and limit the fields available to that entry screen/window.