We are looking for a way to send an email notification out when a BOM revision gets used in a production order for the first time. For example, an existing BOM gets a new revision. The first time that gets used in a production order we want a notification to go out.
Anyone know the best way to approach this? I assume some sort of new GI is needed.
Best answer by CameronSchultz
I think I figured it out. I created a GI against BomItem and ProdItem. Grouped it by BOMID and BomRevision ID and then did a count aggregate on ProdOrdID.
That allowed me to filter for entries with a single production order instance, which should be what I need. From there I can trigger a business event when a record is inserted on that table.
You can create a Generic Inquiry to identify the first time a BOM is used. Based on that, you may then trigger the Business Event accordingly.
For example, the GI can check whether a Production Order or BOM revision has been used previously. If no prior record exists, then it can be treated as the first usage condition.
Once the GI returns the expected data, you can configure the Business Event using that GI as the source and trigger the notification or integration only for the first-time BOM usage scenario.
I think I figured it out. I created a GI against BomItem and ProdItem. Grouped it by BOMID and BomRevision ID and then did a count aggregate on ProdOrdID.
That allowed me to filter for entries with a single production order instance, which should be what I need. From there I can trigger a business event when a record is inserted on that table.