Share via


JmgLoadArchivedTermReg.unpack Method [AX 2012]

Deserializes the packedClass parameter value to an instance of the JmgLoadArchivedTermReg class.

Syntax

public boolean unpack(container packedClass)

Run On

Called

Parameters

  • packedClass
    Type: container
    The container from which to deserialize the instance.

Return Value

Type: boolean
true if deserialization was successful; otherwise, false.

Remarks

When RunBase.isSwappingPrompt returns true, it may be necessary to unpack some prompt-related variables as well.

Examples

The following example demonstrates the use of this method.

public boolean unpack(container packedClass) 
{ 
    Version version = runbase::getVersion(packedClass); 
  
    #localmacro.list1 // This is the first list 
        transDate 
    #endmacro 
  
    switch (version) 
    { 
        case #CurrentVersion: 
            [version,#CurrentList] = packedClass; 
            break; 
        case 1: 
            [version,#list1] = packedClass; 
        default: 
            return false; 
    } 
    return true; 
}

See Also

JmgLoadArchivedTermReg Class

RunBase.pack Method

RunBase.isSwappingPrompt Method

Pack-Unpack Design Pattern