Formatted Search per SDK

Hello,
thank you very much for your effort and valuable time in advance.
I have a question concerning formatted searches.
Is there any possiblity to add formatted searches per SDK?
What's about UserQueries and UserDifinedValues? Could these object be used to add new formatted searches?
Best Regards
Vural Özmen

Hi Vural,
Don't know if it's possible to add User defined Values through SDK, but formatted searches and user querys it's possible. You just need to use the following objects
        Dim oQueryCategory As SAPbobsCOM.QueryCategories = oCompany.GetBusinessObject(oQueryCategories)
        Dim oUserQuery As SAPbobsCOM.UserQueries = oCompany.GetBusinessObject(oUserQueries)
        Dim oFormattedSearch As SAPbobsCOM.FormattedSearches = oCompany.GetBusinessObject(BoObjectTypes.oFormattedSearches)
From what I found in the SDK Help file, The UserDefinedValues is a member of the FormattedSearch object but, has I said above, I've never used it.
Regards,
Vítor Vieira

Similar Messages

  • Create a Formatted Search with SDK?

    Hi,
    Is it possible to create an Formatted Search with the SDK? With which API???
    Thanks for Help
    Thorsten

    Hi Thorsten,
    Nowadays, there is not any standar way to do this. An approach could be to search for the tables where Formatted Searches are stored which are some.
    If you are interested, we have developed a tool that is used to carry personalizations such us Literals, Formatted Searchs, Querys, Document Editings, User Reports, UDF and UDT. It has been very helpfull for us, and we are planning to sell it to other partners. If you are interested send me an email to [email protected]
    Regards,
    Ibai Peñ

  • Extra Formatted Search per field?

    Hi Experts,
    Currently we have a formatted search on Sales Orders which runs if you press SHIFT+F2 when in the item code field (or press the magnifying glass).
    It shows us the most recent items that the customer has purchased.
    Is it possible to add another formatted search to that field which will run if we use a different shortcut (i.e. SHIFT+F3)?
    Thanks
    Greig

    Hi Greig,
    A nice feature from you post.  However, one UDF can only assigned one FMS for current B1 design.  You probably need to create another UDF if you have another logic.
    Thanks,
    Gordon

  • Problems using a formatted search to link order lines to order header

    Hi,
    I'm having a nightmare trying to get the main lines table to populate the header within a sales order using a formatted search.
    I have created a UDF on the header for total value, and where items entered onto the order are of a certain type I need the header UDF to be sumated.
    Basically I have three parts for packaging (PACK1, PACK2 and PACK3), and the header has a UDF called U_TotPack
    Someone did sugest the following query, but this doesn't appear to work either:
    select sum(t0.linetotal) from rdr1 t0 inner join ordr t1 on t0.docentry = t1.docentry
    where t1.docnum = $[ORDR.DocNum] and t0.itemcode in ('PACK1', 'PACK2', 'PACK3')
    If it is a problem for me to use the line total field (as it is a variable calculation) I am happy to total the quantities for the items found, but I just can't seem to build any form of relationship between the header and lines.
    Hope someone out there is able to help as this one has really got me stumped.
    Cheers,
    J

    Hi Julian,
    I'm assuming you are trying to populate the header UDF before the Order is added to the system? If yes then it is not possible to achieve this via a formatted search, only SDK. A header FS cannot properly access line information, it only works the other way around - header info to line level.
    I presume the reasoning is that which line should your header FS take a value from? The FS syntax also doesn't allow you to loop throught all lines.
    The SQL that someone else suggested would only work for a sales order already added to the database. Hope this helps.
    Regards,
    Andrew.

  • Formatted Search Object

    Dear All
    I want to apply Formatted Search by SDK( 2007) on Delivery Notes, In case I set Action='bofsaQuery' I need to set FieldID.
    From Where I can Get List of Field ID, For UDF, its easy but for SAP's Fields I could not find any Table/list of Field ID's....

    Hi,
    There is no this kind of list.
    Use the System Information, and look the Itemid and column id on the B1 GUI.
    Or
    Define the formatted seach by GUI with manual, and check the CSHS table for details.
    Regards,
    J.

  • Formatted Search working Partially on SDK Field

    I have a text field on the Service call screen called
    "A"
    I need the field to be updated with a value taken from the Item Master table, U_A field.
    I have created my query as below,
    SELECT I.U_A FROM OITM I
    WHERE I.ItemCode = $[$33.0.0]
    and set a formatted search on the field A in the Service Call screen to refresh regularly when the Item No field changes.
    The Formatted search does NOT fire when the item number changes.
    It fires only when I do Shft + F2
    HOWEVER if I try the formatted search on a system field on the same screen such as the Description field, then the Item Number Change fires the formatted search.
    Does anyone know of this resriction, or a workaround please?
    appreciate your help.
    Thanks,
    Indika

    Hi Felipe,
    The problem happens when I use the formatted query on a text field I created using the SDK only. It works on any other SAP field.
    as I mentioned, if I press Shift + F2 then it works regardless.
    I tried this on the Item Master screen too with the same result. of course I changed the query to $[$5.0.0].
    Threrefore I don't think it has anything to do with the query syntax , rather the SDK field.
    in any case here is the code (vb6) I used on the Item Master
    Private Function temp(ByRef pval As SAPbouiCOM.ItemEvent) As Boolean
        Dim oItm As SAPbouiCOM.Item
        Dim oForm As SAPbouiCOM.Form
        Dim oRelateItm As SAPbouiCOM.Item
        Dim iRelateItmHt As Integer
        Dim oEdtBox As SAPbouiCOM.EditText
        Set oForm = mObjSBOApplication.Forms(pval.FormUID)
        With oForm
            '---text
            Set oItm = .Items.add("maxGstT", it_EDIT)
            Set oRelateItm = .Items("76") 'closed on date edit box
            oItm.Left = oRelateItm.Left
            oItm.Width = oRelateItm.Width
            oItm.Top = mObjSBOApplication.Forms(pval.FormUID).Items("36").Top   'item group top
            oForm.DataSources.UserDataSources.add "dsmaxGstT", dt_SHORT_TEXT
            Set oEdtBox = oItm.Specific
            oEdtBox.DataBind.SetBound True, "", "dsmaxGstT"
        End With ' With oForm
    End Function
    Message was edited by: Indika Dekumpitiya (spelling)

  • Currency Formatted Search problem

    Hi
    I am trying to creat a formatted search for the marketing docs price / unit price field that populates the field with the currency and money value. I have a lookup table defined in sap where i store the currency and price i want to populate the udf with, based on certain conditions from udf's on the marketing doc's lines.
    when i try to type in a price manually on the form e.g. USD 1 SAP accepts the value with no problems, however business one only lets me insert the actual money value in the field and then inserts the default currency ie if my local currency is ZAR and my formatted search returns a price of 1 then SBO automatically formats the field as ZAR 1.
    If i want to insert a value of USD 1 into the field with the formatted search then SBO returns an error message. I have tried variations such as returning 'USD 1', '1 USD', '1USD', 'USD1' with the formatted search, all of which return an error message. However if i manually type any of the examples in SBO accepts them and formats the column correctly.
    This is quite an important functionality requirement as the customer needs the ability to have different currencies on different lines of a marketing document.
    I have also tried using pricelist lookups with the formatted search but experience exactly the same problem in that i cannot specify the currency in the formatted search.
    If anyone has experienced this problem please let me know if you were able to come up with a solution as manually capturing the prices per line is not an option (documents are often in excess of 500 lines)

    Hi Philip,
    Your question is obviously about functionality of the B1 application - rather than the B1 SDK - and thus might fit better into the "SAP Business One" Forum: SAP Business One Application
    However, I tried to use the non-LC in a Formatted Search in B1 2007 - and I didn't have a problem with that.
    Maybe it's just a bug (that has been fixed)?
    Maybe you should consider using an Add-On / SDK?
    Maybe there's just sth wrong in your query? ...are you sure that your "USD 1" variations are exactly as you wrote?
    Regards,
    Frank

  • Formatted Search for Sales Order

    Hi,
    I setup a formatted search in Sales Order unit price field.
    Condition required:
    If Sales Order is copied from Sales Quotation, unit price remains as per Sales Quotation unit price, else formula to calculate mininum selling price appllies.
    Here's the query:
    DECLARE @BASE_ENTRY INT
    DECLARE @PRICE NUMERIC(19,6)
    SET @BASE_ENTRY = ISNULL($[$38.45.0],0)
    SET @PRICE = $[$38.14.0]
    IF @BASE_ENTRY = 0
    BEGIN 
    SELECT T0.[AvgPrice]*(1+T0.[U_SPFactor])
    FROM OITM T0
    WHERE T0.[ItemCode]=$[$38.1.0]
    END 
    ELSE 
    BEGIN
    SELECT @PRICE
    END
    l have no issue if the Sales Order copied from Sales Quotation, however when enter the Sales Order manually the formatted search having error message:
    1). [Microsoft][SQL Server Native Client 10.0][SQL Server]Error converting data type nvarchar to numeric.
    FMS execution failed on field '' with query name 'Get Minimum Selling Price (SO)'
    Looks like my query has error...

    Hi ,
    Try this below query and let me know your feedback,
    DECLARE @BASE_ENTRY INT
    DECLARE @PRICE NUMERIC(19,6)
    SET @BASE_ENTRY = ISNULL($[$38.45.0],0)
    SET @PRICE = $[$38.14.Number]
    IF @BASE_ENTRY = 0
    BEGIN
    SELECT T0.[AvgPrice]*(1+T0.[U_SPFactor])
    FROM OITM T0
    WHERE T0.[ItemCode]=$[$38.1.0]
    END
    ELSE
    BEGIN
    SELECT @PRICE
    END

  • How can I reference value of a field from a diffrent line in formatted search

    I want to use a formatted search for this
    I want to set a field value based on a value from a previous row. ( is this possible at all ?)
    I have a udf called Test at Line Level on AR Order
    The user enters a value for test on line 1
    he will have a lot more lines then after that. all I want is to copy the value in test ( on row 1) to row2 as the user edits say the Item code on that row.

    Hi,
    Unfortunately formatted search is for current line only , you can't reference the previous or next line .
    You can do achieve this with SDK but with FMS not possible .
    Regards

  • Creating formatted search using DI API

    Dear All,
    Please let me know if we can implement/create formatted search on a UDF textbox using DI API. Is it possible to create formatted search through code using DI API ?
    Regards,
    Noor Hussain

    Yes, it is possible. Look for the FormattedSearches object in SDK.

  • Applying formatted search to checkbox

    I want to set the Payment Block checkbox on AP Invoice automatically when a new invoice is created.
    I tried to do it with a formatted search, but you cannot apply a FMS to a checkbox field.
    Is it possible?
    B1 version 2005A SP01 PL18.
    Regards,
    Douglas

    Dear Douglas,
    It is not possible to assign formatted search to a checkbox field.
    But you can create a small addon in SDK and whenever any invoices will be created
    through the application, it will catch the docentry of the invoice and
    then it will set payment block for that invoice by using the property
    "PaymentBlock" of oPurchaseInvoices object.
    Regards,
    Rakesh Pati
    SAP Business One Forum Team

  • Formatted Search Forms

    Hi Guys,
    Thanks very much to John for the answer concerning the formatted Search Form.
    But I still have the problem that although the formatted Search has already been defined, the system is always asking if I would to define a new formatted Search,
    Has someone already face the same problem ?? and do you know to solve that??
    Thanks,
    Bop

    Did you define the formatted search by setting up the details in the standard prompt screen, or did you use SQL to update the CSHS table?
    If you did it by SQL updates, then it is possible you haven't updated all the fields exactly as required.  If for example you leave the ColID field blank because you are not dealing with a matrix it won't work and will prompt you to define a new search.  This field requires "-1" in it for the search to work.  Mistakes in the other fields can also cause the same behaviour.
    If you are doing it via sql, I would suggest that you first set it up through the standard dialog, test it and note all of the field settings.  You can then delete it and reproduce them all settings through SQL.
    It would be great if CSHS was exposed through the SDK - that would eliminate these types of problems.
    John.

  • Formatted search in Title to know BaseRef

    Dear All,
    I have an udf in the Title of delivery Note. My requirement is that I should get the base reference of it in this udf. Means the Sales Order No. I am trying to do it through automatic formatted search but its not happeing.
    I am using the following query as
    SELECT T1.[DocNum]  FROM DLN1 T0 , ORDR T1 WHERE T1.[DocNum] = $[DLN1.baseref]
    What might be wrong in the above one. Kindly advise.
    Regards,
    Kamlesh

    Dear Prasanna,
    Your formatted search is working perfectly when I am using COPY FROM funtion from Delivery to Sales Order. But when I am doing from Sales Order as COPY TO Delivery then the formatted search field in the delivery is not getting populated.
    I have also made the approval as per my requirement but the problem is that if the user does the Sales Order and uses copy to Delivery then approval is not checking due to non populated of the udf field but when doing Delivery and using Copy from then as the udf is having the base ref nomber hence its working fine.
    Please let me know how can I make it possible that if from Sales Order copy to is done to delivery then the udf would get the base ref number.
    Thanks for giving your inputs and would appreciate if you kindly get me out of it.
    Regards,
    Kamlesh

  • How can i get totals in columns with formated searches

    How can i do this with SDK if it isn´t posible since formated searches

    This is not possible with formated searches.
    With SDK, depends on if it is Matrix or Grid, on if it is a system form/your own form. But basically, loop throw the form or datasource, and do the sumatory.
    Regards,
    Ibai Peñ

  • Getting Error Message using Formatted Search

    Hi,
    I am using formatted search for validating a particular field, and that happens fine.  Kindly let me know if I can also display error messages using the same formatted search.
    If yes, what am I to include in the formatted search, and if No, please let me know the alternative.
    Thanks in advance.
    Satish.

    Hi Satish,
    if you validate the value of a field and intend to rise an error message on detection of invalid values in a separate window or in the status line there is no way to do it with Formatted Searches (as far as I know)!
    You could use the following methods as simple workarounds if you don't want to program a solution with the SDK:
    1. Solution
    You can display the text of an error message in the field you validate; of course, the invalid data then is overwritten with your error message, but you could construct the message from fixed text parts concatenated with the data found in the field.
    Be sure to save the original data of the field in your query before you do anything else. This way you sustain the field data in case the data is valid!
    Example:
    DECLARE @save AS ....
    SET @save = $[xxxxx]
    IF $[xxxxx] test on invalid data
      SELECT 'Error: Invalid data: ' + $[xxxxx] -- in case of error
    ELSE
      SELECT $[xxxxx] -- no error - sustain valid data
    END
    2. Solution:
    You define a sepate User Defined Field (UDF) for potential error messages - that's the way I often programmed it for our own applications. Suppose that the Formatted Search is connected to this UDF and the field to validate is field 'xxxxx'. The Formatted Search is triggered (auto-refresh) on change of field 'xxxxx':
    IF $[xxxxx] test on invalid data
      SELECT 'Error: Invalid data: ' + $[xxxxx] -- in case of error
    END
    May be that there are minor syntactical errors or missing type conversions in the code above - but I hope it gives you an idea on how to solve your problem without SDK programming!
    Good luck!
    Frank Romeni

Maybe you are looking for

  • Adding New Data To Line Chart: New Data Does Not Inherit Previous Color Scheme

    This has me very confused. Here's what's being done: Right-click on existing chart Select "Data..." Add additional data in the dialog that pops up Click check-mark The chart appends more data to the existing lines on the line chart, as it should, how

  • Problem with free trials

    i cannot start my free photoshop trial. what do i have to do?

  • Project Server 2013: customize JSGrid (Project Center, MyTasks, etc...) ?

    Hi, In Project Server 2010, it was possible to customize the JSGrid, thanks to the tutorial included in the SDK "Walkthrough: Customizing the PWA Ribbon and Accessing the JS Grid". It works really fine, and I used this possibility in many Project Ser

  • Idoc pordcr1

    Hi I am having trouble with IDoc PORDCR101 message type pordcr bapi_po_create i  asked this question on another forum and they said post it here so here is my question in we19 for idoc pordcr101 standard inbound i put in comp code 3000 doctype NB ven

  • Photoshop file save problems?

    As i complete a project, i go to save my work and when i get to the save window and try to select the format that i want to save in, i can only save in Photoshop editable file formats and cannot for example save in '.PNG' ect? Please Help!!