DOC - Add a Refresh Button to Marketing Documents

Important Notes

The samples and information below is provided without a warranty of any kind. This post is for informational purposes and coresystems ag assumes no responsibility for errors or omissions in the information provided.


Attached is one customize optimizer rule that will add a refresh button on the bottom of the marketing documents. This button will refresh the columns data and width of the line data (matrix) on the marketing document.


The sample requires coresuite Version 3.50 or higher, and SAP Business One 8.8 or higher.

Procedure to use this small solution

  1. Download the attached file FAQ_10153_Refresh_Button_on_Documents.cocu
  2. Import in SAP Business One via > Administration > Add-Ons > coresuite customize > Import / Export > Import rules. In the message box, select “All Active”. Click on “Import”.
To check the rule in action:
  1. Open an existing Sales Order (for this example, but it can be any marketing document)
  2. Modify the width of any of the columns on the line data matrix.
  3. Click on the Refresh button and see that the columns width will be restore and fitted.

Procedure to adjust this small solution

No specific adjustments known.

Preview Sample (Optimizer Rule C#):

string ruleName = pVal.RuleInfo.RuleName.ToString();
string errorMessage = "Error in Optimizer Rule '" + ruleName + "'";
string buttonUID = "COR_CUS_UP";
string buttonLable = "Refresh";
/* Add the Button to the form */
Button button = Button.CreateNew(buttonUID);
button.SetSizeAndPosition(Button.GetFromUID(pVal.Form, "2"));
button.Value = buttonLable;
button.Left += 2 * (button.Width + 20);
/* Create delegate to refresh matrix when clicking on the button */
delegate (SwissAddonFramework.UI.EventHandling.ItemEvents.ItemPressed eventVal)
catch(System.Exception ex)
Debug.WriteMessage(errorMessage + ": " + ex.Message, Debug.DebugLevel.Exception);
return true;
Was this article helpful?
0 out of 0 found this helpful
Have more questions? Submit a request



Please sign in to leave a comment.