We have created two custom fields related to Lot Numbers:
- Roll No (Manual Field) – User manually enters the value.
- Auto Roll No (Pattern-Based Field) – Automatically generated based on a predefined pattern.
We are facing an issue within the Inventory Detail (Lot Assignment) subrecord.
When we set the value of the Auto Roll No field via script inside the Inventory Detail (Lot section), the system automatically removes/clears the value from the Manual Roll No field.
However:
- Other standard fields such as Quantity, Bin, and Status remain unaffected.
- The issue specifically occurs during record creation (Create mode).
- In Edit mode, both fields work correctly and values are retained.
Key Observation
The problem occurs only when setting the Auto Roll No field programmatically during the creation of a new transaction. The Manual Roll No field gets cleared automatically, even though no script logic explicitly clears it.
Questions:
- What could be the possible reason for this behavior specifically in Create mode?
- Is this related to:
- Subrecord refresh/re-initialization?
- Field sourcing or validation behavior?
- Client vs User Event script timing?
- Dynamic vs Standard mode handling?
- What would be the recommended approach to prevent the Manual Roll No field from being cleared?
Any guidance, similar experiences, or recommended debugging direction would be highly appreciated.