Question & Answer
Question
How do you implement Order Line Extensibility for storing custom attributes in YFS_ORDER_LINE_EXTENSION in IBM Sterling Order Management?
Cause
Order Search screen needs to be extended to include custom attributes
Answer
- Create the Custom Attribute using manageAttribute API. Below is the input xml for reference –
<AttributeList>
<Attribute AllowMultipleValues="" AllowedValueLength="" AttributeDomainID="EntityAttribute_Custom" AttributeGroupID="AttributeGroupID" AttributeID="CustomAttribute-123" AttributePostFix=""
DataType="TEXT" DerivedFromAttributeKey="" IsAllowedValueDefined="" IsValueMandatory="" LongDescription="" Operation="Create" OrganizationCode="DEFAULT" SequenceNo="" ShortDescription=""/>
</AttributeList>
- Call manageEntityAttributeDomain to specify the table name to be used for extension using the below input xml -
<EntityAttributeDomain AttributeDomainID=" EntityAttribute_Custom " DocumentType="0001" Operation="Create" OrganizationCode="DEFAULT" TableName="YFS_ORDER_LINE"/>
- Call manageEntityCustomAttribute API by passing EntityAttributeDomainKey obtained from the previous api’s output. Below is the Reference xml -
<EntityCustomAttributeList>
<EntityCustomAttribute Action="Create" AttributeDomainID="EntityAttribute_Custom" AttributeGroupID="AttributeGroupID" AttributeID=" CustomAttribute-123" EntityAttributeDomainKey="20160721145632233256" OrganizationCode="DEFAULT" Searchable="Y"
Status="ACTIVE" />
</EntityCustomAttributeList>
- Call manageEntityCustomAttribute API again to activate the CustomAttribute, as below -
<EntityCustomAttributeList>
<EntityCustomAttribute Action="Activate"
EntityCustomAttributeKey="20160721145832233258"/>
</EntityCustomAttributeList>
- To verify, Create a Sales Order using below input xml and verify the value of TEXT_1 column in YFS_ORDER_LINE_EXTENSION table. It should be populated with value as CustomAttribute-Value-456
<Order DocumentType="0001" DraftOrderFlag="N" EnterpriseCode="DEFAULT" IgnoreOrdering="Y">
<PersonInfoBillTo Country="US" />
<OrderLines>
<OrderLine Action="CREATE" DeliveryMethod="SHP" ItemGroupCode="PROD" Quantity="1" ShipNode="NODE" >
<OrderLineTranQuantity OrderedQty="1" TransactionalUOM="EACH"/>
<Item ItemID="ITEM" UnitOfMeasure="EACH"/>
<LinePriceInfo IsPriceLocked="Y" UnitPrice="100" />
<CustomAttributes CustomAttribute-123="CustomAttribute-Value-456"/>
</OrderLine>
</OrderLines>
</Order>
[{"Product":{"code":"SS6PEW","label":"Sterling Order Management"},"Business Unit":{"code":"BU059","label":"IBM Software w\/o TPS"},"Component":"Extensions","Platform":[{"code":"PF002","label":"AIX"},{"code":"PF016","label":"Linux"},{"code":"PF033","label":"Windows"}],"Version":"9.4","Edition":"","Line of Business":{"code":"LOB59","label":"Sustainability Software"}}]
Was this topic helpful?
Document Information
Modified date:
16 June 2018
UID
swg21987629