EASetDefaultWarehouseForServiceItems
This document was generated using Claude.ai
Overview
Automatically assigns a default warehouse to service items in supply chain documents that don't already have a warehouse specified. Scans all document lines, identifies service items without warehouse assignments, and sets the specified warehouse for proper inventory tracking and reporting.
When This Action Runs
Manual execution on supply chain documents when service items need warehouse assignments, typically used for standardizing warehouse locations for service items or ensuring all items have proper warehouse tracking for reporting purposes.
How It Works
- Scans document lines - Iterates through all lines in the supply chain document
- Filters for service items - Identifies lines with items that have service item type
- Checks warehouse assignment - Skips lines that already have warehouse assignments
- Updates dimensions - Calls updateNulls() to initialize dimension fields
- Assigns warehouse - Sets the specified warehouse in the line's specific dimensions
- Validates assignment - Verifies the warehouse was found and assigned successfully
- Accumulates errors - Collects any failures for invalid warehouse codes
Parameters
Parameter 1: Warehouse Code (Required) - Code of the warehouse to assign to service items
Example: WH001
, SERVICES
, MAIN
Database Tables Affected
- BasicSCDocumentLine - Updates warehouse assignment in line dimensions
- Warehouse - Reads warehouse record by business code (read-only)
- Item Dimensions - Updates specific dimensions with warehouse information
Important Warnings
⚠️ Service Items Only
- Only affects lines with service item types
- Physical inventory items are not modified
- Non-service items retain their existing warehouse assignments
- Ensure proper item type classification before processing
⚠️ Warehouse Assignment Logic
- Only processes lines that currently have no warehouse assigned
- Lines with existing warehouse assignments are skipped
- This prevents overwriting intentional warehouse selections
- Review existing assignments before applying default warehouses
⚠️ Required Warehouse Validation
- Warehouse code parameter is mandatory and cannot be empty
- Warehouse must exist in the system with valid business code
- Invalid warehouse codes cause processing failures for affected lines
- Test warehouse code validity before production execution
⚠️ Dimension Updates
- Calls updateNulls() to initialize dimension fields before assignment
- This may initialize other dimension fields beyond just warehouse
- Dimension updates affect inventory tracking and reporting
- Consider impact on existing dimension data
⚠️ Document Line Processing
- Processes all document lines regardless of line status
- Lines without valid items are skipped gracefully
- Missing or null item references do not cause errors
- Review document line completeness before processing
⚠️ Inventory Tracking Impact
- Warehouse assignments affect inventory allocation and tracking
- Service items may not require physical inventory management
- Warehouse assignment impacts reporting and analysis
- Consider business requirements for service item warehouse tracking
⚠️ Error Handling Behavior
- Individual line failures don't stop processing of remaining lines
- Failed warehouse assignments are accumulated in result
- Processing continues even with invalid warehouse codes
- Review all error messages for complete understanding
⚠️ Document State Considerations
- Works on documents in any state (draft, approved, etc.)
- Document workflow state may affect the ability to modify lines
- Consider document locking and approval requirements
- Ensure appropriate permissions for dimension modifications
Module: supplychain
Full Class Name: com.namasoft.modules.supplychain.domain.utils.plugnplay.EASetDefaultWarehouseForServiceItems
Document Type: Supply Chain Documents with Service Items
Related Actions:
- Warehouse management entity flows
- Item dimension management actions
- Document line processing utilities