Re-enable UDF in Marketing Docs

Hi,
I had created a UDF in marketing docs with DI API and in my code I set the field to be Enabled = false, ok, no problems until yesterday. Now I need to set Enabled = true but i'm getting the error "The field is not a user defined field" and i can't set my Enabled back to true;
This is a bug?
I already made a search in the forum, I found only one problem like mine but it's not solved:
- Enabling & Disabling UDF's
Thanks,
Ricardo Momm

Hi Edward,
I'm accessing the UDF via user interface with UIAPI. If I try to set the Enabled property to False nothing happens but if I try to set the Enabled property to True the exception "Item is not a user defined item" is throw.
form.Items.Item("U_Field").Enabled = false; // no error
form.Items.Item("U_Field").Enabled = true; // throw not a UDF field
The point is, in the first run when I set the Enabled property to false there is no exception and the Field is disabled, after this operation i can't set the Enabled property to true again.
My SAP B1 Version is: 2005B PL34
PS: sorry with the poor english... i'm still learning

Similar Messages

  • Hide UDFs in Marketing Docs (Not Displayed)

    Hi All,
    I have created 12 UDFs in Marketing Docs for the "Stock Transfer"....But they will appear in all the Marketing Docs (AR and AP and many, many, many more)  It seems like I would have to go into each and every Marketing Doc under each and every User Name and Edit the UDFs Settings.
    Is there a way I can hide these UDFs from all the Marketing Docs/Forms except the intended Form??? (Stock Transfer Form) without the use of coding.  I want to use the Std SBO Customizing functionality...
    Thanks Guys

    Hi Noor,
    I don't know a way to block the added UDFs to be visible and modified by the user...  unless changing the settings for the specific form (be careful the user has no rights to change them one more time and block your calculations).
    The best way to avoid problems is to block the user from modifying them by disabling them when the form is loaded (by using SDK).
    Anyone else has a better trick?
    Regards
    Trinidad.

  • XLR old reports not working with UDF from Marketing docs

    Hi,
    We are using SAP Business One 2005 A (6.80.318)  SP: 01  PL: 16 and the following version of XLR.
    XLR Version 6.80.367 (under about XLR) or 6.80.01.26 (under Add-ons manager).
    We have just gone from 6.80.01.25 to 6.80.01.26 version of XLR and have had an issue with the reports that contain UDF's. 
    Previously when doing patches of SBO we have had issues with the UDF's renumbering eg.  SalesEmp_1 becoming SalesEmp_2.  Within the XLR reports we would simply update the identifier of the UDF and it would report correctly.
    The issue this time is that the identifier has disappeared.  ie. SalesEmp_1 has become SalesEmp.  When you create a new report the data can be retrieved correctly however when you change the existing report to reflect SalesEmp (rather than SalesEmp_1) it reports no data. 
    I am not keen on re-creating all of my reports with UDFs and was wondering if anyone else had encountered the same issue and come up with a solution. 
    It may have something to do with the UDF's being available as Dimensions now whereas previously they were only Light Dimensions?
    Let me know if I need to clarify further - although it will probably make perfect sense if you have been through the same issue - and if you haven't you may not be able to help.
    Kind regards
    Andrew

    Hi Andrew,
    Unfortunately I don't know the answer to your question...
    ...but anyway, this Forum is focussing on the SAP Business One SDK.
    In principle the Implementation Forum in the PartnerEdge P2P (http://p2p.sap.com/businessoneforum?type=join) area should more suitable for such questions.
    I suggest that you raise your issue there - and hope that you will get the right answer.
    ...or since the issue came up when you changed from one version of XLR to another - log a question to SAP Support on the XLR component.
    Sorry,
    Frank

  • Using UDF in Marketing documents

    Dear All,
    I made two UDF in Marketing docs rows and the same rows in Accounting - Journal transaction rows
    The goal is: Every time when the user creates a marketing docs, I'd like to insert the corresponding data to accounting. What should I do for this? Could this be automatically somehow? Is it a simple way to capture all of the events which modifies the journal entries?

    well,
    i would do it so:
    use et_VALIDATE and/or et_LOST_FOCUS in the matrix and make one procedure for all documents.
    to be sure the code only works for your documents filter it like
    if (pval.FormType = 139 or pval.Formtype = 133 or ...) then
    anyway, it will be very tricky, because you will get troubles when more documents are opened
    regards
    David

  • UDF populating on Marketing Doc's Matrix

    Hi all,
    I've created UDFs in the IGN1 table using the sdk but all the Fields are being displayed in all the Marketing Doc's Matrix. ie: AR & AP.  I dont want them to be displayed on all the forms.  I only want them to appear on the "Reciept from Production Form".  How do I do that?
    Thanks

    Hi guys,
    I'm getting an Exception:
    "System.Runtime.InteropServices.COMException (0x80040111): Retrieving the COM class factory for component with CLSID {FD65E5A4-2232-452B-8541-5BC1EC3FF9C6} failed due to the following error: 80040111."
    with the following snippet...
        Public Sub SetFormPreferences()
            Dim oCompanyService As SAPbobsCOM.CompanyService
            Dim oFormPreferencesService As SAPbobsCOM.FormPreferencesService
            Dim oColumnsPreferences As SAPbobsCOM.ColumnsPreferences
            Dim oColumnsPreferencesParams As SAPbobsCOM.ColumnsPreferencesParams
            Dim oColumnPreferences As SAPbobsCOM.ColumnPreferences
            oCompanyService = oCompany.GetCompanyService
            oFormPreferencesService = oCompanyService.GetBusinessService(SAPbobsCOM.ServiceTypes.FormPreferencesService)
            System.Runtime.InteropServices.Marshal.ReleaseComObject(oCompanyService)
            Try
                oColumnsPreferencesParams = New SAPbobsCOM.ColumnsPreferencesParams
                oColumnsPreferencesParams.FormID = "139"
                oColumnsPreferencesParams.User = 1
                oColumnsPreferences = oFormPreferencesService.GetColumnsPreferences(oColumnsPreferencesParams)
                oColumnPreferences = oColumnsPreferences.Item("U_ETypDe")
                SapApp.MessageBox("In form 139, U_ETypDe visibility is set to - " & oColumnPreferences.VisibleInForm)
            Catch ex As Exception
                SapApp.MessageBox(ex.ToString)
            End Try
        End Sub
    Can anyone help with this?
    Thanks

  • Line Delete capability on marketing docs

    Hi,
       can anyone let me know which version of SAP enables marketing docs line deletion capabilities using the SDK? Is it 8.8 or 2007 SP1?
    Thanks.
    Gopal

    Hello
    it is avaiable from B12007
    Usage:
    oDoc.lines.setcurrentline(i)
    oDoc.lines.Delete()
    regards
    János

  • Need additional field populated along with this FMS on Market Docs

    During creation of a marketing doc such as Sales order, the user searches for the item which has this query loaded into item field.
    SELECT T0.[ItemCode], t1.[AvgPrice],t1.[OnHand], T1.[WhsCode] FROM OITM T0  INNER JOIN OITW T1 ON T0.ItemCode = T1.ItemCode WHERE T1.[WhsCode] =(SELECT warehouse from oudg where code= 'manager') and t0.[invntitem]='Y'
    Search of item field displays other info such as quanitty in warehouse and warehouse along with item code. In above case the warehouse is 02 for maanger profile.
    However, on selecting any of the above items, the warehouse displayed on sales order is 01 (not 02 which is what it should have been). Why did not the relevant warehouse 02 get loaded?
    How can I over come this without using just the above FMS query. Do I have to use another FMS query for warehouse field also?
    Thank you.
    Hi, I have this FMS query that displays items from warehouse of the  logged in user's defaults. However, the actual warehouse on sales

    Hi,
    FMS query will only return the first column from the query result. Whatever displayed will be irrelevant. If you need Warehouse 02, FMS has to be set on warehouse column with the whscode as first column.
    Thanks,
    Gordon

  • Marketing docs including item remarks in the printed form?

    On the PO window you will see all items the user has added including text rows. When you print the document it is including the IMD remarks for parts that have that populated. I have not found why this being included. As far as I can see the text rows that are referenced in the PLD are from the Purchase Order:Rows. I see no reference to the IMD remarks. We do not want this on any of our marketing docs. It is happening on all of them currently. Any help you can offer would be greatly appreciated.
    Thanks,
    Monica

    Hi
    You have to select the specific template based on your business process . Since you have decided to put the text(function) in the purchase order and I believe documents are usually created based on copy from and copy to function , you have to find the appropriate PLD format to handle your situation .
    I have given an alternative workaround  for this issue because I donot like PO with whole bunch of text which is difficult for to read .
    1. Ask your user to use opening and closing remark instead of using text field .
    2.Display this opening and closing remarks in PLD - Database  -OPOR Field -Header
    3.Print the information on PLD .
    Limitation -user cannot see in the screen that remarks have been added unless print preview is used
    So I have ask user  to create a common code and put in remarks that means there are more remarks associated with this documents
    Hope this helps  you
    Bishal

  • How to update UDF from marketing documents to Journal Entry UDF

    Hi Experts,
    I have a UDF in the marketing documents and I want to save the value to Journal Entry UDF.
    Regards,
    Jummie

    Hello Jummie,
    If I understand correctly, the scenario is that copy the value of UDF from marketing document to the UDF its target JE from when the marketing document is created.
    if so, just listen to FormDataAdd Event for the marketing document, copy the value of udf when document is created.
    Here is the sample code.
    Private Sub FormDataEventHandler( _
        ByRef BusinessObjectInfo As SAPbouiCOM.BusinessObjectInfo, _
        ByRef BubbleEvent As Boolean) Handles oApp.FormDataEvent
            'You may add the target documents, 133 - A/R invoice.
            'Before action = true, start the transation
            If BusinessObjectInfo.FormTypeEx = "133" _
                    And BusinessObjectInfo.EventType = SAPbouiCOM.BoEventTypes.et_FORM_DATA_ADD _
                    And BusinessObjectInfo.BeforeAction = True Then
                oCompany.StartTransaction()
                'BubbleEvent = False
            End If
            'Before Action = false,
            'Update product item tree
            'Succeed, commit, otherwise rollback
            If BusinessObjectInfo.FormTypeEx = "133" _
            And (BusinessObjectInfo.EventType = SAPbouiCOM.BoEventTypes.et_FORM_DATA_ADD) Then
                If BusinessObjectInfo.BeforeAction = False And BusinessObjectInfo.ActionSuccess Then
                    Dim objectKey As String = String.Empty
                    oCompany.GetNewObjectCode(objectKey)
                    MsgBox(BusinessObjectInfo.Type)
                    Dim oInvoice As SAPbobsCOM.Documents = Nothing
                    oInvoice = oCompany.GetBusinessObject(SAPbobsCOM.BoObjectTypes.oInvoices)
                    If oInvoice.GetByKey(CInt(objectKey)) Then
                        'Retrieve the UDF value in documents
                        Dim udfValueInDoc As String = oInvoice.UserFields.Fields.Item("***").Value
                        Dim oJE As SAPbobsCOM.JournalEntries = oCompany.GetBusinessObject(SAPbobsCOM.BoObjectTypes.oJournalEntries)
                        'Retrieve the JE for the document
                        oJE.GetByKey(CInt(oInvoice.JournalMemo))
                        Dim succeeded = True
                        'add you code to copy the UDF from document into JE
                        If succeeded Then
                            'update the production tree succesfully,
                            oCompany.EndTransaction(SAPbobsCOM.BoWfTransOpt.wf_Commit)
                        Else
                            oCompany.EndTransaction(SAPbobsCOM.BoWfTransOpt.wf_RollBack)
                        End If
                    End If
                End If
            End If
        End Sub
    Regards, Yatsea

  • UDF In Marketing Document At Title Level - Display/Activate

    Can you display an UDF in a Marketing Document and if so how do you make it visible and active?  I see how to do this for the rows but not the title.

    Go to menu - View - User Field.  Or simply CtrlShiftU.
    It will be visible and active by default unless you manually uncheck the boxes under setting.
    Thanks,
    Gordon

  • SP01: UI 2005SP1 PL2: problems enabling UDF

    Hi,
    i'm trying to enable and disable an UDF Editbox field via UI sdk.
    i succeed in disable the editbox UDF but can not enable it anymore, the error i receive is:
    Error - Item - The item is not a user-defined item  [66000-8]
    i succeed doind anable and diasble successfully to a Combobox UDF.
    someone ever encountered this?
    thanks
    Moty

    Hi,
    I have tried with the form 149 and it works fine, strange...
    Please define a UDF called KitNo and copy paste my code in your project ItemEvent method, then please let me know if it works or not in your case.
    If (pVal.FormTypeEx = "149") Then ' BP form
    If (pVal.EventType = SAPbouiCOM.BoEventTypes.et_FORM_LOAD And Not pVal.BeforeAction) Then
       oForm = SBO_Application.Forms.Item(pVal.FormUID)
       ' Add edit text
       oSItem = oForm.Items.Item("222")
       oItem = oForm.Items.Add("UserEd", SAPbouiCOM.BoFormItemTypes.it_EDIT)
       oItem.Left = oSItem.Left
       oItem.Top = oSItem.Top + 20
       oItem.Width = oSItem.Width
       oItem.Height = oSItem.Height
       oEdit = oItem.Specific()
       oEdit.DataBind.SetBound(True, "OQUT", "U_KitNo")
       ' Add user button at form load
       oSItem = oForm.Items.Item("2")
       oItem = oForm.Items.Add("UserBut", SAPbouiCOM.BoFormItemTypes.it_BUTTON)
       oItem.Left = oSItem.Left + 300
       oItem.Top = oSItem.Top
       oItem.Width = oSItem.Width
       oItem.Height = oSItem.Height
       oButton = oItem.Specific()
       oButton.Caption = "My Button"
      ElseIf (pVal.EventType = SAPbouiCOM.BoEventTypes.et_ITEM_PRESSED And _
        pVal.ItemUID = "UserBut") Then
        oForm = SBO_Application.Forms.Item(pVal.FormUID)
        If (pVal.Before_Action = False) Then
          If (oForm.Items.Item("UserEd").Enabled) Then
            oForm.Items.Item("UserEd").Enabled = False
          Else
            oForm.Items.Item("UserEd").Enabled = True
          End If
          Dim oFormUDF As SAPbouiCOM.Form = SBO_Application.Forms.GetForm("-149", 1)
          If (oFormUDF.Items.Item("U_KitNo").Enabled) Then
            oFormUDF.Items.Item("U_KitNo").Enabled = False
          Else
            oFormUDF.Items.Item("U_KitNo").Enabled = True
          End If
        End If
      End If
    End If
    Regards
    Trinidad.

  • How to set the value to non enabled UDF fields

    Dear All,
    I created a UDF at titile level of PO and that UDF item always disabled (i.e oItem.Enabled=false). Now how can set a value through coding.
    I wrote like this:
    oForm = SBO_Application.Forms.GetFormByTypeAndCount(-142, 1);
                                oItem = oForm.Items.Item("U_Poap");
                                if (oItem.Enabled == false) { oItem.Enabled = true; }
                                oEdit = ((SAPbouiCOM.EditText)(oItem.Specific));
                                oEdit.Value = "1";
                                oItem.Enabled = false; 
    But system throws an error at : oItem.Enabled=true statement.
    How to solve issue.
    Thanks in advance
    Suresh Yerra

    Hi,
    You can set the values using datasource object
    oDBs_Head = objForm.DataSources.DBDataSources.Item("@TableName")
    oDBs_Head.SetValue("U_FieldName", 0, "Value")
    regards:
    SANDY
    Sandeep Saini | Roorkee | India on Dec 26, 2008 11:01 AM

  • Enabled UDF's are not displaying in XL Report Composer.

    Hi,
    I Enabled User Defined Fields (UDF) under manage user defined fields. But itu2019s displaying only Light dimensionu2018s fields. But Dimension attributeu2019s fields are not displaying in XL Report composer. How we can display Dimension attribute fields in XL Report.
    Regds,
    Sampath Kumar.

    Hi,Danie Posthumus
    First of all we are not able to see my User define filed in report composer except for light dimensions type. Only we are getting Light Dimension Data Item type only we are not getting Dimension Attribute Data item type.
    Regds,
    Sampath Kumar Devunuri.

  • Hi all visible false udf in marketing document

    hi all,
    i want to visible false udf in the marketing document.but field not show in the forms object.
    how is possible.

    thanks to replr but i haven't got udf in the active form event.
    If pVal.FormType = "142" Then 'Purchase Order Form
                    If pVal.EventType = SAPbouiCOM.BoEventTypes.et_FORM_LOAD And BubbleEvent = True And FLAG = False Then
                                       oFormAPOrder = SBO_Application.Forms.GetFormByTypeAndCount(pVal.FormType, pVal.FormTypeCount)
                            'Form = SBO_Application.Forms.ActiveForm
                            Dim oItem As SAPbouiCOM.Item
                            oItem = oForm.Items.Item("U_UIN")
                            oItem.Visible = False
    end if
    end if
    i read in forum that u have to catch form with -142 then u get the udf of the form.
    but i tried my problem not solved.
    Regards
    Rajkumar

  • Limiting Authorization of one of many UDF in marketing documents

    Hi
    I have created a Additional Authorization Creator for limiting the user from changing the values of  UDF Field and its working fine,  but the issue is i need to block only one UDF which i have created.
    For Eg.
    There are some 5 UDF (Header Level UDF) in a marketing document, namely
    UDF 1 - Transport Name
    UDF 2 - Transport Type
    UDF 3 - Vehicle Number
    UDF 4 - Driver Number
    UDF 5 - Driver Name
    I need to block only the UDF 5 from changing and the other UDF's can be changed.
    The Additional Authorization Creator which i created block's me from changing all the five UDF Values instead of only that UDF 5 .
    What could be reason?  Should i need to give any  Form Number like what i give  63771 which is for Form Settings?

    Hi
    you can open the document , open the user defined field
    go to tools---customization tools ---settings
    you will see the list of UDF you can just select which UDF you want to update
    you can mark 4 UDF as active and the 5-th UDF as not active but visible
    shachar

Maybe you are looking for

  • How to Run iTunes off a Network Hard Drive?

    How do you set up multiple computers in the same house to run iTunes off of a common music library stored as a shared folder on a network hard drive? It seems that this would be a simple & obvious thing to do just by changing the music folder path on

  • A Transport-level error

    Our .net application throws an error when the wireless laptop switches from wireless access point to another inside a building. it seems like SQL is closing the existing connetion without notifying the application which thinks that sqlconnetion is st

  • Tracking entries in Text tables

    Hi Experts, I have a text table and some entries in it have their descriptions truncated . Now i want to see who changed it last. Last Changed by parameter doesnt give the relevant information. Please help. Thanks! Best Regards, Gayathri

  • Work Instructions in Adobe

    I use Adobe Acrobat 9 Pro Extended on a regular basis but not in much depth. Much of it includes converting 3D model files into pdfs since they are more readily viewable. I've read a little about some of the more powerful tools and was wondering if s

  • AdobeInDesign7_5_2_Patch-All gives "Error loading updater workflow"

    InDesign CS5.5 Version 7.5.0.142 Any ideas please? Thanks.