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.
Purpose
Attached is one rule that will add the Business Partner name on the Journal Remarks of the A/R Invoice before is added, thus also passing this Remark to the Journal Entry that is created in the Add process.
Requirements
The templates require coresuite Version 3.50 or higher, and SAP Business One 8.8 or higher.
Procedure to use these templates
1. Download the attached DOC_10170_Add_BP_... file
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:
Just create a new A/R Invoice and press the Add button. Call back the A/R Invoice and click on the Accounting tab.
Procedure to adjust these templates
If other marketing documents are needed just add the form ID on the ItemUID on the Trigger area in the Optimizer window.
Preview Sample (Optimizer Rule C#):
/*
***** General Information *****
Creator: <coresystems USA>, <buwi>
Create Date: 2012-07-09
***** StartConfDesc *****
<DOC:10170:Add BP Name to Journal Remarks>
***** EndConfDesc *****
***** Updates *****
YYYY-MM-DD, name: Update Comment
*/
string ruleName = "DOC:10170:Add BP Name to Journal Remarks";
string errorMessage = "Error in Optimizer Rule '" + ruleName + "'";
try
{
SAPbouiCOM.Form AFORM;
AFORM = SwissAddonFramework.B1Connector.GetB1Connector().Application.Forms.ActiveForm;
SAPbouiCOM.EditText oJRemark = (SAPbouiCOM.EditText) AFORM.Items.Item("18").Specific;
SAPbouiCOM.EditText oName = (SAPbouiCOM.EditText) AFORM.Items.Item("54").Specific;
string NewRemark = oJRemark.Value + " - " + oName.Value;
AFORM.Freeze(true);
AFORM.Items.Item("138").Click(SAPbouiCOM.BoCellClickType.ct_Regular);
oJRemark.Value = NewRemark.PadRight(50).Substring(0,50);
AFORM.Items.Item("112").Click(SAPbouiCOM.BoCellClickType.ct_Regular);
AFORM.Freeze(false);
}
catch (Exception ex)
{
MessageBox.Show(errorMessage + ": \n" + ex.Message, "OK");
StatusBar.WriteError(errorMessage + ": " + ex.Message);
Debug.WriteMessage(errorMessage + ": " + ex.Message, Debug.DebugLevel.Exception);
}
GC.Collect();
return true;
Comments
0 comments
Please sign in to leave a comment.