coresystems blog http://blog.coresystems.ch coresystems blog Wed, 21 Jan 2009 15:52:17 +0000 http://wordpress.org/?v=2.6 en Create your own Right-Click Menu Options in Enterprise Search http://blog.coresystems.ch/?p=1221 09 May 2012 http://blog.coresystems.ch/?p=1221&lang=eng In this blog I want to show how you can save time with the help of the coresuite country package by creating your own right-click menu options in the coresuite enterprise search. Finding relevant data in SAP Business One and performing the relevant action will become even easier and more efficient. Learn and see how you can preview or email documents for business partners via right rick from the coresuite enterprise search in SAP Business One. Scenario Let's say your customer Eric calls and asks you to send a recent invoice via email they could not find anymore. Currently you can quickly find the the latest invoice sent to Eric with the coresuite enterprise search without even knowing the actual company name or the date of the invoice. From the coresuite enterprise search you can open the document in SAP Business One and send the email from the document. In the newest version of coresuite 3.50 you can improve this process even more and skip the step of opening the document. Instead you can preview the document or send the email directly via right-click from the invoice displayed in the coresuite enterprise search. Five Steps to implement the solution in your system
  1. Make sure you have coresuite 3.50 or higher installed with all modules updated and activated. Required modules for this functionality are coresuite enterprise search, coresuite customize and coresuite designer.
  2. Download and extract the attached the coresuite customize rules to create new right click menu
  3. Import the rules to SAP Business One via > Adminstration > Add-Ons > coresuite customize > Import / Export > Import Rules. Make sure to set all rules to "Active" during the import process.
  4. Restart coresuite
  5. Open the coresuite enterprise search from the menu > Help > coresuite enterprise search or in the cockpit.
Now you are ready to search for documents and preview or send document via right-click. Technical details on how to create your own menus For technical consultants or developers who want to create their own menu in enterprise search or adjust the examples provided here some more details regarding the rules. Let's have a look at some parts of the code of the customize rule "CSENSE: Preview Document via Right Click": Menu Description: Define the description that should be displayed in the right-click menu in the parameter menuDescription. Here "Preview Document". string menuDescription = "Preview document"; Affected enterprise search categories: Set a filter to define for which object(s) the right-click menu should appear in the enterprise search. In this sample the menu will appear for all marketing documents (Sales and Purchasing): "COR_EnterpriseSearch.RemoteAPI.CATEGORY.Document" if (menuInfo.GetCategory() == COR_EnterpriseSearch.RemoteAPI.CATEGORY.Document) Information about right-clicked menu: To get more details on which menu entry the user right-clicked, we store all the available information in an XML and extract the relevant nodes. In this example we read out the "objType" and the "docEntry" since we need these parameters to start the print definition. string xml = menuInfo.GetAsXML(); System.Xml.XmlDocument xdoc = new System.Xml.XmlDocument(); xdoc.LoadXml(xml); // read out the objType and docEntry from the clicked menu string objType = xdoc.SelectSingleNode("/MenuObject/objType").InnerText; string docEntry = xdoc.SelectSingleNode("/MenuObject/docEntry").InnerText; Action after Right-Click Menu selected: In the code sample below is the actual action what to do after the user selected the right-click menu. In this sample I get the first valid print definition available and run it in the corresponding modus, here "LayoutHelper.LayoutOpener.OpenLayoutModes.Preview". If there is no print definition available the user will get a message. // Get one valid Printdefinition Code to use string sql = "SELECT TOP 1 T0.Code FROM [@SWA_LD_PRNDEF] T0 INNER JOIN[@SWA_LD_FORMTYPE] T1 ON T0.U_FormType = T1.Code WHERE T0.Canceled = 'N' AND T1.U_ObjectId = '" + objType + "' UNION ALL SELECT ''"; string printDef = SwissAddonFramework.Utils.SQL.ExecuteQueryScalar(sql).ToString(); if (printDef == "") { MessageBox.Show("No valid Print Definition found!", "OK"); } else { // call a printDefinition to preview this document LayoutHelper.LayoutOpener.ExecutePrintDef(printDef, LayoutHelper.LayoutOpener.OpenLayoutModes.Preview, "DocEntry", docEntry, "ObjectId", objType); Just for clarification: all this functionality is included in the product coresuite country package.
Reporting made easier with coresuite designer Functions - LD.GetParameterDescription http://blog.coresystems.ch/?p=1205 09 May 2012 http://blog.coresystems.ch/?p=1205&lang=eng How often did you have to display the multi-selection the user did for a certain report parameter like Business Partners, Sales Persons or others in a report? And how happy is the common user when he reads a list of codes in a report he does not understand? The challenge here is to transform the code which is used to filter the data to the description that is understandable by the user. This Blog describes in samples the function "LD.GetParameterDescription" in the latest version of the coresuite designer which helps to make this transformation possible without much coding. With the example of the standard coresuite report "Sales Documents (SAR06000)" I will demonstrate how we display the description of Business Partner, Business Partner Group, Item, Business Partner Properties, Sales Employee, instead of the codes. To explain what I am talking about in pictures see the preview of the selection parameters in the report [caption id="attachment_1206" align="alignnone" width="300" caption="Before"][/caption] [caption id="attachment_1207" align="alignnone" width="300" caption="After"][/caption] To get this new preview all you have to do is use the coresuite designer function "LD.GetParameterDescription" in the report to display the parameter: LD.GetParameterDescription( <1. PARAMETER STRING IN DESIGNER>, <2. TABLE NAME IN SAP BUSINESS ONE>, <3. KEY FIELD IN TABLE>, <4. DESCRIPTION FIELD IN TABLE>, <5. KEY AND DESCRIPTION OR ONLY DESCRIPTION>) Example Business Partner Group:
  1. The parameter string value in the designer can be retrieved with GetData("LD.Par.CardGroup")
  2. The Table Name of the Business Partner Groups in SAP Business One is "OCRG"
  3. The Column Name of the Primary Key for Business Partner Groups in SAP Business One is "GroupCode"
  4. The Column Name of the Description for Business Partner Groups in SAP Business One is "GroupName"
  5. In this case the Unique Key of the Business Partner Group is not really helpful for the user who runs the report so we do not display it and set the last option to False
That means the code line to enter as value for the corresponding Text Box is: LD.GetParameterDescription(GetData("LD.Par.CardGroup"), "OCRG", "GroupCode", "GroupName", False) For more information to other coresuite designer functions wou can download the API documentation here.
coresuite & User Defined Values also known as Formatted Searches http://blog.coresystems.ch/?p=1177 03 May 2012 http://blog.coresystems.ch/?p=1177&lang=eng In this Blog I would like to give a short overview about "user defined values" (also known as "formatted searches"). I will describe when it is OK to define user defined values and which type of user defined values must be avoided. I will also explain why performance issues with user defined values can be worse when coresuite is running. Advantages & disadvantages of user defined values User defined values are defined to provide predefined values for certain fields or fill fields with predefined values. This can set to be done automatically or on user request. The advantages are that field values can be determined or calculated according to the customer's requirements. Providing predefined values will speed up entering data and prevent user errors. In general I suggest avoiding user defined values whenever possible. The reasons are decreased performance and difficulties when trying to find root causes of wrong Business One behavior. As alternative I suggest to use coresuite and create the relevant rules and functions with the coresuite customize module. Example: Good user defined value In general any user defined value that does NOT have the checkbox "Auto Refresh When Field Changes" selected should not cause any performance issues or unwanted behavior. An example of a user defined value we like to use is to create a “choose from list” for a certain field: [caption id="attachment_1189" align="alignnone" width="300" caption="Choose From List with User Defined Values"][/caption] Example: Bad user defined value User defined values that DO have the checkbox "Auto Refresh When Field Changes" selected must be treated with care and tested extensively to prevent performance issues or unwanted behavior. In general, user defined values which are defined on a matrix row field and set to "Auto Refresh When Field Changes" cause performance issues. The performance decreases with the increase of the number of rows in the matrix. An example of a user defined value with dramatic performance decrease is to fill values in rows whenever a value on the document header that is calculated depending on row values changes: [caption id="attachment_1196" align="alignnone" width="300" caption="Refresh Commission on rows automatically when document total changes"][/caption] Why performance issues? When using user defined values which are automatically refreshed SAP Business One sends several events in order to make sure all values are refreshed. These events are processed by SAP Business One and all Addons. The more events the more time it takes to process. Since coresuite needs to catch all events from SAP Business One we cannot filter those events. The only solution is to prevent the “bad user defined values” Alternative Depending on the customer's requirements there are different alternatives. When it is required to calculate values in rows automatically we suggest to use an "Easy Row Function", available from coresuite version 3.50 and higher. More information SAP provides a How-To Guide in the SAP Business One Customer Portal for download. I attached the latest version as of May 03, 2012 to this blog: How To Define User Defined Values managing campaigns part 3 (last part), attach additional campaign documents to your email http://blog.coresystems.ch/?p=1141 08 Feb 2012 http://blog.coresystems.ch/?p=1141&lang=eng Hi dear follower In the other two blog posts about managing campaigns i've showed you how you can use the activity of sap business one as a carrier for campaign information. Please check out Part 1 and 2 which are prerequisites for this blog: Part 1 Part 2 Starting with SAP B1 8.8 there is the possibility to add Attachments to a lot of objects. This comes in very handy as well for our campaign activities. We can use it for example to attach additional PDF's with Product specifications. Now wouldn't it be nice if those attachments get attached automatically now when sending the campaign emails? Watch the following movie to see how it's done: Have Fun! Customize Rule which adds the Attachments Snippet to get the direct link to the campaign activity in the overview layout: The low hanging coresuite designer fruits series: Part 3, using taiwan calendar to display dates http://blog.coresystems.ch/?p=1133 27 Jan 2012 http://blog.coresystems.ch/?p=1133&lang=eng Hi dear follower Recently we had to deliver a layout which should display the date in taiwan calendar format. Because we can use the full .NET stack inside our scripts this task became fairly easy. There is also support for other calendars, just check out the System.Globalization functions within MSDN All you need to do is to insert the following script into the document CommonScript: Dim taiwanCalendar As System.Globalization.TaiwanCalendar = New System.Globalization.TaiwanCalendar() And to use it as follows (copy/paste directly into the integrated coresuite designer tool): ?xml version="1.0" encoding="utf-16" standalone="yes"?> HowTo Video: Have Fun! black belt in coresuite designer series, part 1, duplicating and offplacing a databand detail http://blog.coresystems.ch/?p=1118 11 Jan 2012 http://blog.coresystems.ch/?p=1118&lang=eng Hi dear follower We are supporting a lot of different countries with our coresuite country package. So different the countries are, so are the documents they print. Lately i've ran into a document which should duplicate the document information on one a4 page. Here a sample of what i mean: So you see that the row information got duplicated on the same page. The goal is to cut the A4 paper into 2 pieces in the middle to have 2 copies of it. Not sure if there are printer drivers available which already support this scenario but at least in this case it was not. The interesting part of this task was to duplicate the row information (the blue part) and display it again offplaced by half a page (the green, copy part) To get there we should know that the integrated coresuite designer rendering engine supports getting and setting the current RenderHeight value which is in fact the exact position the rendering currently takes place. So all we do in the end is fiddling around with this value, get it, set it back and force an PageBreak by script. HowTo Video: Get the finished layout here: doublelayout as .rst file Have fun! The low hanging coresuite designer fruits series: Part 2, from apples and bananas http://blog.coresystems.ch/?p=1095 30 Dec 2011 http://blog.coresystems.ch/?p=1095&lang=eng Hi dear follower This post is not about apple vs. windows and so on. It's about the simple fact that you can not sum together apples and bananas, clear? imagine you have the following field in the designer data tree:
and you use it in the value expression like: GetData("B1_Data.Company.Code") + "100" What would you expect to be the result? Well in this case it's 101. But maybe the user wanted to have 1100 (adding strings/texts) The situation we have here is a apples and bananas situation. because the left side of the expression contains a numeric (our apples) value and the right side an string/text (our bananas). Now because VB is always expecting the worst when it comes to compiling our scripts it already makes some assumptions ;) It examines the left side of the expression and finds an numeric value so it assumes that the user wants to calculate a numeric value here. So if we now really want to have "1100" as the ouput (string/text operation) then we should write the expression like: GetData("B1_Data.Company.Code") & "100" The amperesand makes it clear that VB should treat all of the expressions as text. Thats how we can avoid getting a fruit salad, have fun!
The low hanging coresuite designer fruits series: Part 1, xml is everywhere http://blog.coresystems.ch/?p=1091 30 Dec 2011 http://blog.coresystems.ch/?p=1091&lang=eng Hi dear follower Have you ever saved a report out of the integrated designer tool to a file? If yes you maybe already have recognised that it's saved in a xml format. Well this is handy but did you know that you even can copy/paste a single object (eg. a TextBox) into a texteditor? Well the following snippet is what you will get. just copy/paste it back to the integrated designer (to any new or existing layout) tool and start the preview: Have fun! Mobile ERP – the next generation business apps http://blog.coresystems.ch/?p=1078 03 Dec 2011 http://blog.coresystems.ch/?p=1078&lang=eng According to the newest reports by GARTNER and IDC, billions of employees will utilize mobile apps in the next years. But how can you use these new innovations with your existing on premise ERP system like SAP and co.? The solution is a hybrid model between onpremise and cloud services. coresystems provides with coresuite exactly this technology and is already in use by more than 5000 customers across the world. How the hybrid model between onpremise ERP and cloud works coresuite offers standard ERP functions on your iPhone and co. Thanks to the coresuite cloud the mobile functions can be integrated seamless with your onpremise ERP systems. A cloud connector links your ERP or CRM systems with the coresuite cloud and synchronizes all important business data which you need on the mobile devices. The cloud synchronizes all data between the cloud and the mobile devices. coresuite cloud works like the Apple iCloud, but instead of pictures and music coresuite synchronizes your business data between the smartphones of your employees. The mobile workforce can use the coresuite mobile solution totally offline and can work any time and everywhere.  All new entered information by the mobile workers will automatically be added by the cloud connector to your ERP systems. Added Value for your mobile workforce With coresuite you are able to integrate your mobile workforce seamless, saving operational costs and you are able to streamline all your processes in the field. This hybrid technology allows you to keep your onpremise ERP solution and you don’t need to invest in any hardware or middleware. The solution is installed in just a few hours and you don’t need any consulting or development effort. With coresuite mobile your employees can enter business information like sales orders, timesheet, expenses or do approvals directly on the smartphone. The, ‘easy-to-use-interfaces’ are quickly learned and you can reduce input errors. Another added value is the fast feedback of your field service. You can optimize the invoicing process by more than 50%. With coresuite you can access ERP information from a plane, a cab or immediately after an appointment. Test drive and costs You can test coresuite for free! Just download the current coresuite mobile app for iPhone or iPad here. coresuite provides standard mobile apps for managers, sales and service field workers, CRM and HR. Please have a look on our store for further information www.coresuite.com Using DataMatrix 2d Barcode with coresuite designer http://blog.coresystems.ch/?p=1067 01 Dec 2011 http://blog.coresystems.ch/?p=1067&lang=eng Hi dear followers of the coresystems blog Due of more and more requests for using datamatrix 2d barcode in designer layouts i've decided to write an blog about it. The designer itself already contains some 2d codes but as for now the datamatrix is missing in there. To solve this you can install a very specific BarcodeHelper2.sip which will provide the functionality for datamatrix code. To consume it then in the layout you can use the AdvancedPicture Object and assign its Image Property directly. all the needed barcode files Well if this was too technical, no Problem. You may also just watch the following movie which will explain the installation in detail. You'll see it's not a big thing :) Hope this helps Philipp Adding external datasources (XML) to a coresuite designer report http://blog.coresystems.ch/?p=1046 25 Oct 2011 http://blog.coresystems.ch/?p=1046&lang=eng Hi dear followers Recently we had the requirement to include XML-Data into an existing coresuite designer document. Thanks to the new layout-triggers in coresuite customize, this type of tasks became fairly easy. Enjoy! Philipp