Skip to main content
Solved

Update Stock Item Attributes When Last Cost Is Changed

  • August 18, 2026
  • 2 replies
  • 52 views

Update Stock Item Attributes When Last Cost Is Changed

I need help creating a Business Event / automation in Acumatica for the following requirement.

Requirement

When the Last Cost of a Stock Item is updated from:

Stock Items → Price/Cost tab → Last Cost

I want to automatically update two attributes in the Stock Item → Attributes tab:

Attribute ID Attribute Value
ILANDEDCST Cost Landed Cost
IMARGIN Cost Margin

The values for these attributes are currently available through a Generic Inquiry.

Expected Process

  1. User updates Last Cost on the Stock Item.

  2. The Business Event should detect that the Last Cost has changed.

  3. The Business Event should trigger an Import Scenario.

  4. The Import Scenario should update the corresponding attributes on the Stock Item:

    • Attribute ILANDEDCST

    • Attribute IMARGIN

  5. The updated values should then be visible in the Stock Item → Attributes tab.

Issue

I have already created the Generic Inquiry and Import Scenario, but I am having difficulty getting the Business Event to trigger when Last Cost is changed from the Stock Items screen.

I would like to know:

  • What should be used as the Business Event Trigger?

  • Which DAC/field should be monitored for the Last Cost change?

  • Should I use InventoryItem.LastCost or another field/table?

  • How should the Business Event be configured so it triggers only when Last Cost changes?

  • What is the recommended way to update CSAnswers for the attributes ILANDEDCST and IMARGIN?

  • Is an Import Scenario triggered by a Business Event the correct approach for this requirement, or is there a better Acumatica-native approach?

I am using Acumatica  / 2026 R1.

Any guidance on the correct GI → Business Event → Import Scenario → Stock Item Attributes configuration would be greatly appreciated.

Thank you.

Best answer by smilner3

Your blocker is the data source. A business event whose Screen Name is a data entry form can't use an Import Scenario subscriber — that combination isn't allowed. Point the event at your GI instead.

Event setup (SM302050): Type = Trigger by Record Change, Screen Name = your GI, Raise Event = For Each Record.

Last Cost on the Price/Cost tab is INItemCost.LastCost, keyed by InventoryID + CuryID. There is no InventoryItem.LastCost. Add that column to the GI's Results Grid, then add it on Fields to Track — previous values only exist for tracked fields. Build the Trigger Condition on Last Cost comparing the new value against the previous one. That's what stops it firing on every save.

Subscriber: create it from the event with Create Subscriber > Import Scenario. That auto-generates a Business Process Provider bound to your GI, with Results and PreviousResults objects. An event only accepts a scenario whose provider uses that same GI, so a scenario you already built against a different provider won't be selectable.

Mapping (SM206025): Screen Name = Stock Items (IN.20.25.00), Provider Object = Results. Inventory ID first as the key, then Attribute + Value rows for ILANDEDCST and IMARGIN, then <Action: Save>. Don't touch CSAnswers directly — map through the Attributes node. <Key: AttributeID> inserts itself, and Commit must stay selected on the Value rows or the attributes silently won't save.

Both attributes need to be on the item's item class (IN201000) first.

GI → Record Change event → Import Scenario is the correct approach here. It's the standard pattern for updating a field on data change.

2 replies

smilner3
Varsity III
Forum|alt.badge.img+1
  • Varsity III
  • Answer
  • August 18, 2026

Your blocker is the data source. A business event whose Screen Name is a data entry form can't use an Import Scenario subscriber — that combination isn't allowed. Point the event at your GI instead.

Event setup (SM302050): Type = Trigger by Record Change, Screen Name = your GI, Raise Event = For Each Record.

Last Cost on the Price/Cost tab is INItemCost.LastCost, keyed by InventoryID + CuryID. There is no InventoryItem.LastCost. Add that column to the GI's Results Grid, then add it on Fields to Track — previous values only exist for tracked fields. Build the Trigger Condition on Last Cost comparing the new value against the previous one. That's what stops it firing on every save.

Subscriber: create it from the event with Create Subscriber > Import Scenario. That auto-generates a Business Process Provider bound to your GI, with Results and PreviousResults objects. An event only accepts a scenario whose provider uses that same GI, so a scenario you already built against a different provider won't be selectable.

Mapping (SM206025): Screen Name = Stock Items (IN.20.25.00), Provider Object = Results. Inventory ID first as the key, then Attribute + Value rows for ILANDEDCST and IMARGIN, then <Action: Save>. Don't touch CSAnswers directly — map through the Attributes node. <Key: AttributeID> inserts itself, and Commit must stay selected on the Value rows or the attributes silently won't save.

Both attributes need to be on the item's item class (IN201000) first.

GI → Record Change event → Import Scenario is the correct approach here. It's the standard pattern for updating a field on data change.


@smilner3 I have resolved the Issue BE is working now.

Thanks for your help