Skip to main content
Solved

Business Event to Change Sales Order Information?


Forum|alt.badge.img

I’m trying to create a Business Event, that when it triggers, it changes some information in a specific Sales Order Record. I presume it is using a Action Execution, but I’m not sure which Action Name needs to be used. The few I tried didn’t work.

Best answer by bwhite49

@kkraus the business event subscriber will become available when created from a GI.

First, create a GI that will list out all sales orders/records that you need to update. Build out the conditions for this list to only show records that need to be updated. Exclude them from this list when they have been updated. For example, in your GI conditions you will only want to show records where the “Use customer account” field = True or =1. You also want to make sure you are not trying to update completed or cancelled orders. Make sure you have the key fields of “order type” and “order nbr” displaying in the GI.

Next, create the business event as a trigger by action and use this GI as the source. This allows you to manually test the business event to see if it is updating as expected. The action to run the update will appear on the GI under the 3 dots (...)

After that, create your import scenario subscriber to the business event to connect to the sales order and update these two fields. 

After testing and it works as expected, change to a trigger by schedule type business event. Add the schedule for update frequency. The end goal is that your GI list should always be empty. When a record shows up in the GI, it should be updated and then removed from the list.

View original
Did this topic help you find an answer to your question?

13 replies

Samvel Petrosov
Jr Varsity II
Forum|alt.badge.img+5

What do you want to change on the Sales Order? It may be easier to do with running an import scenario from the Business event.

 

There are a couple of questions about this that may help you build what you need.

 

Import Scenarios trigger by Business Event - import line detail | Community

Business Event Import Scenario to create task when opportunity status change to Won | Community

Business Event import scenario, finding the GI result grid if it's a formula | Community


Forum|alt.badge.img
  • Author
  • Freshman I
  • 44 replies
  • March 25, 2025

@Samvel Petrosov In the Sales Order, I’m trying to get the Sales Order to change to “Use Customer Account” from false to true and 0 out the cost for the Sales Order. However, when looking at a Business Event with Sales Order as the screen name, I’m unable to create a Import Scenario subscriber. 


bwhite49
Pro I
Forum|alt.badge.img+1
  • Pro I
  • 91 replies
  • Answer
  • March 25, 2025

@kkraus the business event subscriber will become available when created from a GI.

First, create a GI that will list out all sales orders/records that you need to update. Build out the conditions for this list to only show records that need to be updated. Exclude them from this list when they have been updated. For example, in your GI conditions you will only want to show records where the “Use customer account” field = True or =1. You also want to make sure you are not trying to update completed or cancelled orders. Make sure you have the key fields of “order type” and “order nbr” displaying in the GI.

Next, create the business event as a trigger by action and use this GI as the source. This allows you to manually test the business event to see if it is updating as expected. The action to run the update will appear on the GI under the 3 dots (...)

After that, create your import scenario subscriber to the business event to connect to the sales order and update these two fields. 

After testing and it works as expected, change to a trigger by schedule type business event. Add the schedule for update frequency. The end goal is that your GI list should always be empty. When a record shows up in the GI, it should be updated and then removed from the list.


Forum|alt.badge.img
  • Author
  • Freshman I
  • 44 replies
  • March 25, 2025

@bwhite49 This makes a lot of sense, but I can’t seem to get the last few steps to work. I’ve create the GI with the special filters so that only these very specific orders arrive here, and are booted once they’re changed. 

In the business event, I use this as the Screen Name and Set it to an Action Trigger,

With the Following Import Scenario.

The Action appears on the GI perfectly fine,

But when I select it, nothing happens. The Fields don’t change, the BE doesn’t show a run in the log, and the Order doesn’t drop out of the list. Where did I mess up?


bwhite49
Pro I
Forum|alt.badge.img+1
  • Pro I
  • 91 replies
  • March 25, 2025

That’s a common glitch/bug with trigger by action business events. If you add a new field to the GI results grid, save, and then delete and save. This refreshes the data provider. I think you can also just go to the data provider screen and refresh there.

Once you run it manually again, a green checkbox will appear whether it did anything or not, but it will show up in BE history.

There is also a bug/glitch once you switch it to a trigger by schedule. It is very common for a schedule to not “do anything” the first day. It should start running the 2nd day no problem


bwhite49
Pro I
Forum|alt.badge.img+1
  • Pro I
  • 91 replies
  • March 25, 2025

Oh sorry, I just saw the import scenario. You are trying to edit the SOLine unit price?

You will need to grab join the SOLine table in you GI and get the “line nbr” field in the results grid. 

The import scenario will need a bit of work. I will draft in a bit


Forum|alt.badge.img
  • Author
  • Freshman I
  • 44 replies
  • March 25, 2025
bwhite49 wrote:

Oh sorry, I just saw the import scenario. You are trying to edit the SOLine unit price?

You will need to grab join the SOLine table in you GI and get the “line nbr” field in the results grid. 

The import scenario will need a bit of work. I will draft in a bit

Yes, I’m trying to change the SOLine unit price, unless there’s a better way of taking the Sales Order to a price of zero. I’ve already included SOLine in the Generic Inquiry.

 

bwhite49 wrote:

That’s a common glitch/bug with trigger by action business events. If you add a new field to the GI results grid, save, and then delete and save. This refreshes the data provider. I think you can also just go to the data provider screen and refresh there.

Once you run it manually again, a green checkbox will appear whether it did anything or not, but it will show up in BE history.

 

Tried updating the GI and retrying the Event and nothing happened.


bwhite49
Pro I
Forum|alt.badge.img+1
  • Pro I
  • 91 replies
  • March 25, 2025

Your import scenario should look like below. You are missing key fields as well as the save action which I think is why your business event is not triggering. 

 

 


Forum|alt.badge.img
  • Author
  • Freshman I
  • 44 replies
  • March 27, 2025

Alright, I tried to create the import scenario as you described ​@bwhite49, however, the SOLine_lineNbr isn’t appearing in the Source Field.

 

It’s in the GI though.

 


bwhite49
Pro I
Forum|alt.badge.img+1
  • Pro I
  • 91 replies
  • March 27, 2025

I think you need to update the data provider. Go to the data providers screen, find the business event, and then click on the 2 highlighted buttons. Once done, you can go to import scenario screen and the line nbr field should be available.

 


Forum|alt.badge.img
  • Author
  • Freshman I
  • 44 replies
  • March 27, 2025

Ok, everything runs smoothly to setting it up to run as you suggested ​@bwhite49. The test runs, however, the Business event gets an error of “Unit Conversion is missing.” I tried removing the unit price and cost, but the error still showed up.

 


bwhite49
Pro I
Forum|alt.badge.img+1
  • Pro I
  • 91 replies
  • March 27, 2025

I think commit needs to be turned on for yellow and off for red and maybe change to @@LineNbr not @@Line Nbr. … Everything else looks good to me.

 

 


Forum|alt.badge.img
  • Author
  • Freshman I
  • 44 replies
  • March 27, 2025

That was it. Finally worked! Thank you so much.


Reply


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings