Bill to code setup through DI API

Hi,
When trying to to create a sales order through Documents object in DI API,
I can pass in a ShipToCode to choose different ship to address that has been created in Business Partner. I want to implement the same function like choosing different bill to code, but I can't find a Bill to code to setup in this Documents object.
I know that I can use AddressExtension to pass in both bill to and ship to address.
Any information plz suggest me...
Thanks

Hi QZ Zhang,
You was not very far... PayToCode is your answer, and with ShipToCode they reference both addresses from a document.
Regards,
Eric

Similar Messages

  • Retrieving billing/usage through Azure API

    I'm looking to retrieve my account usage details through Azure API but couldn't find the relevant API for that.
    I know I can download the CSV file of usage details in Azure Portal Account->Subscriptions->Download Usage Details, and would need to retrieve the same through API.
    Any help is appreciated. Thanks in advance.

    Hi ksrishna,
    Thanks for your posting!
    Currently we don't got the billing usage file using API. You could download in the account page on the portal. Also, you could vote this feature via this customer feedback page:
    http://feedback.azure.com/forums/170030-billing/suggestions/1143971-billing-usage-api
    Regards,
    Will
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • How to Update UDO through DI API code

    Hello,
    I have created UDO through DI API successfully, now I want to update the UDO through DI API code, and want to add some more child tables, but I am unable to do that, its showing me message that UDO successfully updated but when I am checking through B1, I can see that newly created child tables are not ticked in the check boxes. I am pasting my code, Please some one tell me how to fix this problem.
    Private Sub AddUDO()
    Dim oUserObjectMD As SAPbobsCOM.UserObjectsMD
    oUserObjectMD = oCompany.GetBusinessObject(SAPbobsCOM.BoObjectTypes.oUserObjectsMD)
    oUserObjectMD.CanCancel = SAPbobsCOM.BoYesNoEnum.tYES
    oUserObjectMD.CanClose = SAPbobsCOM.BoYesNoEnum.tYES
    oUserObjectMD.CanCreateDefaultForm = SAPbobsCOM.BoYesNoEnum.tNO
    oUserObjectMD.CanDelete = SAPbobsCOM.BoYesNoEnum.tYES
    oUserObjectMD.CanFind = SAPbobsCOM.BoYesNoEnum.tYES
    oUserObjectMD.CanLog = SAPbobsCOM.BoYesNoEnum.tNO
    oUserObjectMD.CanYearTransfer = SAPbobsCOM.BoYesNoEnum.tYES
    oUserObjectMD.ManageSeries = SAPbobsCOM.BoYesNoEnum.tYES
    oUserObjectMD.ChildTables.TableName = "DC3_N"
    oUserObjectMD.ChildTables.Add()
    oUserObjectMD.ChildTables.TableName = "DC4_N"
    oUserObjectMD.Code = "UDO_CHECK_N"
    oUserObjectMD.ManageSeries = SAPbobsCOM.BoYesNoEnum.tYES
    oUserObjectMD.Name = "UDO_CHECK_N"
    oUserObjectMD.ObjectType = SAPbobsCOM.BoUDOObjType.boud_Document
    oUserObjectMD.TableName = "DMT_N"
    oUserObjectMD.GetByKey("UDO_CHECK_N")
    lRetCode = oUserObjectMD.Update()
    If lRetCode <> 0 Then
    If lRetCode = -1 Then
    'chkUDOAfter.SetItemChecked(12, True)
    Else
    oCompany.GetLastError(lRetCode, sErrMsg)
    MsgBox(sErrMsg)
    End If
    Else
    MsgBox("UDO: " & oUserObjectMD.Name & " was updated successfully")
    'chkUDOAfter.SetItemChecked(14, True)
    End If
    oUserObjectMD = Nothing
    GC.Collect() 'Release the handle to the table
    End Sub
    Regards,
    Sudeshna.

    Hi Ian,
    I have pasted the line "oUserObjectMD.GetByKey("UDO_CHECK_N")" immediately after "oUserObjectMD = oCompany.GetBusinessObject(SAPbobsCOM.BoObjectTypes.oUserObjectsMD)
    " like below:
    oUserObjectMD = oCompany.GetBusinessObject(SAPbobsCOM.BoObjectTypes.oUserObjectsMD)
    oUserObjectMD.GetByKey("UDO_CHECK_N")
    but this time it is adding the two new tables in UDO, but some how removing the first Master table from UDO.
    Can you tell me how solve this, or can you provide some working code example regarding this.
    Regards,
    Sudeshna.

  • Unable to Change Withholding Tax Base Amount while creating Service AP Invoice through DI API?

    Dear All,
    I am trying to create Service AP Invoice through DI API.
    If I post the document without changing SAPPurchaseInvoice.WithholdingTaxData.TaxableAmount the dount ocument is created in SAP without any problem.
    But if I change amount in above field then DI API throws error Unbalanced Transaction.
    If I post same document in SAP with changed base amount it got posted in SAP without any Issue.
    Where I am doing wrong?
    please guide.
    Using:
    SAP B1 version 9 Patch Level 11
    Location : India.
    Thanks.

    Hi ,
    maybe you can find solution to these note 1812344
    1846344  - Overview Note for SAP Business One 8.82 PL12
    Symptom
    This SAP Note contains collective information related to upgrades to SAP Business One 8.82 Patch Level 12 (B1 8.82 PL12) from previous SAP Business One releases.
    In order to receive information about delivered patches via email or RSS, please use the upper right subscription options on http://service.sap.com/~sapidp/011000358700001458732008E
    Solution
    Patch installation options:
    SAP Business One 8.82 PL12 can be installed directly on previous patches of SAP Business One 8.82
    You can upgrade your SAP Business One to 8.82PL12 from all patches of the following versions:8.81; 8.8; 2007 A SP01; 2007 A SP00; 2007 B SP00; 2005 A SP01; 2005 B
    Patch content:
    SAP Business One 8.82 PL12 includes all corrections from previous patches for releases 8.82, 8.81, 8.8, 2007, and 2005.
    For details about the contained corrections, please see the SAP Notes listed in the References section.
    Notes: SAP Business One 8.82 PL12 contains B1if version 1.17.5
    Patch download:
    Open http://service.sap.com/sbo-swcenter -> SAP Business One Products -> Updates -> SAP Business One 8.8 -> SAP BUSINESS ONE 8.82 -> Comprised Software Component Versions -> SAP BUSINESS ONE 8.82 -> Win32 -> Downloads tab
    Header Data
    Released On
    02.05.2013 02:34:18  
    Release Status
    Released for Customer  
    Component
    SBO-BC-UPG Upgrade  
    Priority
      Recommendations/additional info  
    Category
      Upgrade information  
    References
    This document refers to:
      SAP Business One Notes
    1482452
    IN_Wrong tax amount was created for some items in the invoice with Excisable BOM item involves
    1650289
    Printing Inventory Posting List for huge amount of data
    1678528
    Withholding amount in the first row is zeroed.
    1754529
    Error Message When Running Pick and Pack Manager
    1756263
    Open Items List shuts down on out of memory
    1757641
    Year-end closing
    1757690
    SEPA File Formats - New Pain Versions
    1757898
    Incoming Bank File Format
    1757904
    Outgoing Bank File Format
    1762860
    Incorrect weight calculation when Automatic Availability Check is on
    1770690
    Pro Forma Invoice
    1776948
    Calendar columns are wrong when working with Group View
    1780460
    OINM column description is not translated
    1780486
    UI_System crash when you set extreme value of double type to DataTable column
    1788256
    Incorrect User-Defined Field displayed in a Stock Transfer Request
    1788372
    ZH: 'Unacceptable Field' when export document to word
    1788818
    RU loc: No freight in the Tax Invoice layout
    1790404
    Cash Flow Inconsistency when Canceling Payment
    1791295
    B1info property of UI API AddonsInstaller object returns NULL value
    1791416
    Adding a new item to BoM is slow
    1794111
    Text is overlapping in specific localization
    1795595
    Change log for item group shows current system date in all the "Created" fields
    1797292
    Queries in alerts should support more query results
    1800055
    B1if_ Line break issue in inbound retrieval using JDBC
    1802580
    Add Journal Voucher to General Ledger report
    1803586
    Not realized payment is exported via Payment Engine using 'SAPBPDEOPBT_DTAUS' file format
    1803751
    Period indicator of document series can be changed although it has been used
    1804340
    LOC_BR_Cannot update Nota Fiscal Model
    1805554
    G/L Account displayed in a wrong position when unticking the checkbox "Account with Balance of Zero"
    1806576
    Payment Cannot Be Reconciled Internally
    1807611
    Cannot update UDF in Distribution Rule used in transactions
    1807654
    Serial No./Batch inconsistency by canceled Inventory Transfer
    1808694
    BR: Business Partner Code cannot be updated with CNPJ CPF error
    1809398
    CR_Cannot Display Related Multi-Value Parameters
    1809758
    Arrow key not work for Batch/Serial Number Transactions Report
    1810099
    Tax Amount is Recalculated Even if Tax Code Is Not Changed
    1811270
    Upgrade fails on Serial And Batches object with error code -10
    1811846
    Cannot run Exchange Rate Differences when multi branch is activated
    1812344
    Withholding Tax Amount Is Not Updated in Payment Once Witholding Tax Code Is Changed in Document through DI API
    1812740
    DI:"Operation Code" show wrong value when add "A/P Tax Invoice" based on "A/P Invoice"
    1813029
    US_Vendor address on 1099 Summary by Form/Box Report is not updated according to the latest Invoice
    1813835
    Wrong amounts of Goods Return in Open Item List
    1814207
    Preliminary page prints setting does not keep after upgrade
    1814860
    Value "Zero" cannot be imported to "Minimum Inventory Level" field via Excel file
    1815535
    RFQ: Web front end not displayed in supplier language
    1815810
    GT: Adding Incoming Payment for Some Cash Flow Relevant Accounts Fails
    1816191
    BR:System Crashes While Working with Tax Code Determination Window
    1816611
    CR_Crystal Report Displayed Incorrectly Afte

  • Problem in Creating Default Form Through DI API

    Hi All,
    I am using the below code to create UDO and make it as Default Form through DI API. But the Default Form property is not getting set, that is the Default Form is not being created. The UDO is getting created. Any help is appreciated.
    // Verify that UDO is defined
                if (!(oCreateUDO.UDOExist(oCompany, "WEB_USER")))
                    SAPbobsCOM.UserObjectsMD MyUDO = (SAPbobsCOM.UserObjectsMD)oCompany.GetBusinessObject(SAPbobsCOM.BoObjectTypes.oUserObjectsMD);
                    //Set Services
                    MyUDO.CanCancel = SAPbobsCOM.BoYesNoEnum.tYES;
                    MyUDO.CanCreateDefaultForm = SAPbobsCOM.BoYesNoEnum.tYES;
                    MyUDO.CanDelete = SAPbobsCOM.BoYesNoEnum.tYES;
                    MyUDO.CanFind = SAPbobsCOM.BoYesNoEnum.tYES;
                    MyUDO.CanClose = SAPbobsCOM.BoYesNoEnum.tYES;
                    MyUDO.CanLog = SAPbobsCOM.BoYesNoEnum.tYES;
                    MyUDO.CanYearTransfer = SAPbobsCOM.BoYesNoEnum.tNO;
                    //MyUDO.ManageSeries = SAPbobsCOM.BoYesNoEnum.tYES;
                    MyUDO.Code = "WEB_USER";
                    MyUDO.Name = "Define Portal User";
                    MyUDO.ObjectType = SAPbobsCOM.BoUDOObjType.boud_MasterData;
                    MyUDO.TableName = "PORUSR";
                    MyUDO.FindColumns.ColumnAlias = "Code";
                    MyUDO.FindColumns.ColumnDescription = "Code";
                    MyUDO.FindColumns.Add();
                    MyUDO.FindColumns.ColumnAlias = "Name";
                    MyUDO.FindColumns.ColumnDescription = "Name";
                    MyUDO.FindColumns.Add();
                    MyUDO.FindColumns.ColumnAlias = "U_name";
                    MyUDO.FindColumns.ColumnDescription = "Name";
                    MyUDO.FindColumns.Add();
                    MyUDO.FindColumns.ColumnAlias = "U_Email";
                    MyUDO.FindColumns.ColumnDescription = "Email";
                    MyUDO.FindColumns.Add();
                    MyUDO.FindColumns.ColumnAlias = "U_Status";
                    MyUDO.FindColumns.ColumnDescription = "Status";
                    MyUDO.FindColumns.Add();
                    MyUDO.FindColumns.ColumnAlias = "U_TAG";
                    MyUDO.FindColumns.ColumnDescription = "TAG";
                    MyUDO.FindColumns.Add();
                    MyUDO.FindColumns.ColumnAlias = "U_bp";
                    MyUDO.FindColumns.ColumnDescription = "BP Code";
                    MyUDO.FindColumns.Add();
                    MyUDO.FindColumns.ColumnAlias = "U_password";
                    MyUDO.FindColumns.ColumnDescription = "Password";
                    MyUDO.FindColumns.Add();
                    if (MyUDO.Add() != 0)
                        MessageBox.Show("Failed to add UDO");
    Thanks and Regards,
    Noor Hussain

    Dear All,
    Thanks a lot. I had forgot to add the form columns to the UDO object while creating UDO.
    Regards,
    Noor Hussain
    Edited by: noor_023 on Mar 1, 2012 11:54 AM

  • How to Create Highlighted text through the API

    I am trying to create a script that goes through a document and cut/pastes specific elements to another document in FrameMaker 7.1.
    So far, I can open a document and if an element is already highlighted/selected, i can cut the whole element using F_ApiCut().
    I am having problems programatically trying to highlight the element that I want to copy.
    So far, I have tried using the exampe from the FDKRef:
            //grab the selected element and set it to the elementRange
            er = F_ApiGetElementRange(FV_SessionId, docId, FP_ElementSelection);
            parentId = F_ApiGetId(docId, er.beg.childId, FP_ParentElement);
            er.end.parentId = er.beg.parentId = F_ApiGetId(docId, parentId, FP_ParentElement);
            // if the selected element is a child of the highest level element, the client returns here
            if(!er.end.parentId) return;
            er.beg.childId = parentId;
            er.beg.offset = er.end.offset = 0;
            er.end.childId = F_ApiGetId(docId, parentId, FP_NextSiblingElement);
            F_ApiSetElementRange(0, docId, FP_ElementSelection, &er);
            F_ApiCut(docId, 0);
    but this only grabs an element that is already selected. Is there a way to select an element through the API?
    Thanks for any help!

    TrainingDeveloper,
    There most certainly is a way. You can set up any kind of selection that you want, although it is definately a tricky process that can throw off even an experienced FDK developer. Here are my observations based on the code you pasted...
    If you want to select an element, the first thing is that you need to have the ID of that element. I don't see anywhere in your code where an element ID is retrieved. All I see is the F_ApiGetElementRange which is getting the current selection, which in turn is likely why you just keep cutting the currently-selected element. If you want to get a specific element, that function call is not applicable. You only need to set up the element range structure to reflect the proper selection and then cut.
    With that, assume that "elemId" is the ID of the element you want to cut. To select an entire element, you would do this:
    F_ObjHandleT elemId, docId;
    F_ElementRangeT er;
    /* . . .   code here to get elemId, docId, etc. . . .  */
    //set up the element range structure for whole-element selection
    er.beg.childId = elemId;
    er.beg.parentId = er.end.parentId =  F_ApiGetId(docId, elemId, FP_ParentElement);
    er.end.childId = F_ApiGetId(docId, elemId,  FP_NextSiblingElement);
    er.beg.offset = er.end.offset =  0;
    //set the element selection in preparation for the cut
    F_ApiSetElementRange(FV_SessionId, docId,  FP_ElementSelection, &er);
    //... and cut
    F_ApiCut(docId, 0);
    I'm not sure what the sample you pasted is meant to accomplish. It is somewhere along the right track but it won't get you exactly what you want.
    Now, I should say that the process of retrieving the desired element ID is a whole different challenge. I'm not sure if you know how to do that or not so I'll defer any discussion on that until you ask.
    Russ

  • How do you unlock your ipad without a passcode if it wasnt setup through itunes

    How do you unlock your ipad without a passcode if it wasnt setup through itunes

    How can I unlock my iPad if I forgot the passcode?
    http://www.everymac.com/systems/apple/ipad/ipad-troubleshooting-repair-faq/ipad- how-to-unlock-open-forgot-code-passcode-password-login.html
    iOS: Device disabled after entering wrong passcode
    http://support.apple.com/kb/ht1212
    How can I unlock my iPad if I forgot the passcode?
    http://tinyurl.com/7ndy8tb
    How to Reset a Forgotten Password for an iOS Device
    http://www.wikihow.com/Reset-a-Forgotten-Password-for-an-iOS-Device
    Using iPhone/iPad Recovery Mode
    http://ipod.about.com/od/iphonetroubleshooting/a/Iphone-Recovery-Mode.htm
    You may have to do this several times.
    Saw this solution on another post about an iPad in a school environment. Might work on your iPad so you won't lose everything.
    ~~~~~~~~~~~~~
    ‘iPad is disabled’ fix without resetting using iTunes
    Today I met my match with an iPad that had a passcode entered too many times, resulting in it displaying the message ‘iPad is disabled – Connect to iTunes’. This was a student iPad and since they use Notability for most of their work there was a chance that her files were not all backed up to the cloud. I really wanted to just re-activate the iPad instead of totally resetting it back to our default image.
    I reached out to my PLN on Twitter and had some help from a few people through retweets and a couple of clarification tweets. I love that so many are willing to help out so quickly. Through this I also learned that I look like Lt. Riker from Star Trek (thanks @FillineMachine).
    Through some trial and error (and a little sheer luck), I was able to reactivate the iPad without loosing any data. Note, this will only work on the computer it last synced with. Here’s how:
    1. Configurator is useless in reactivating a locked iPad. You will only be able to completely reformat the iPad using Configurator. If that’s ok with you, go for it – otherwise don’t waste your time trying to figure it out.
    2. Open iTunes with the iPad disconnected.
    3. Connect the iPad to the computer and wait for it to show up in the devices section in iTunes.
    4. Click on the iPad name when it appears and you will be given the option to restore a backup or setup as a new iPad (since it is locked).
    5. Click ‘Setup as new iPad’ and then click restore.
    6. The iPad will start backing up before it does the full restore and sync. CANCEL THE BACKUP IMMEDIATELY. You do this by clicking the small x in the status window in iTunes.
    7. When the backup cancels, it immediately starts syncing – cancel this as well using the same small x in the iTunes status window.
    8. The first stage in the restore process unlocks the iPad, you are basically just canceling out the restore process as soon as it reactivates the iPad.
    If done correctly, you will experience no data loss and the result will be a reactivated iPad. I have now tried this with about 5 iPads that were locked identically by students and each time it worked like a charm.
    ~~~~~~~~~~~~~
    Try it and good luck. You have nothing more to lose if it doesn't work for you.
     Cheers, Tom

  • Updating a sales order through DI API

    Hi All,
         I have an issue regarding updating a sales order.
    The problem is:
      If there r 2 items(A00001&A00002) existed in the sales order and if I am adding two more items(A00003 & 4)the sales order is updated in a fashion that first item is replaced with third item and forth item is added as last record.The items to that particular sales order after updating will be like this(A00003,A00002,A00004).My doubt is why the 3rd item is replaced with first record.I am sending the code also i have written.
    objRecordSet = SBOCOMUtil.newRecordset(company);
                          IDocuments  oOrder =SBOCOMUtil.newDocuments(company,SBOCOMConstants.BoObjectTypes_Document_oOrders);
                                  objRecordSet.doQuery("select DocEntry from ORDR where DocNum=" + 1111);
                                  DocEntryL =objRecordSet.getFields().item(new String("DocEntry")).getValueInteger().intValue();
                          str += DocEntryL;
                          System.out.println(DocEntryL);
                          if (oOrder.getByKey(new Integer(DocEntryL))) {
                                  //objRecordSet2.doQuery("delete  from rdr1 where DocEntry="+DocEntryL);
                                  str += "2";
                                  System.out.println(str);
                                  //oOrder.remove();
                                  oOrder.setDiscountPercent(new Double(5));
                                  oOrder.setComments("success");
                                  System.out.println(str);
                                  IDocument_Lines oOrderLines = oOrder.getLines();
                                  str += "3";
                                  String[] item={"A00005","A00006"};
                                  for (int counter = 0; counter < item.length; counter++) {
                                       //  oOrderLines.setCurrentLine(new Integer(counter));
                                         if (counter > 0)
                                                 oOrder.getLines().add();
                                         str += "4";
                                  oOrderLines.setItemCode(item[counter]);
                                  System.out.println(item[counter]);
                                     //oOrderLines.setBaseType(new Integer(-1));
                                     //oOrderLines.setBaseEntry(new Integer(0));
                                   //oOrder.getLines().setCurrentLine(new Integer(counter));
                               //oOrderLines.setQuantity(new Double(1));
                                         //oOrderLines.setPrice(new Double(1500));
                                         //oOrderLines.setCurrency(strCurrency[counter]);
                                         //oOrderLines.setLineTotal(new Double(dblLineTotal[counter]));
                                  str += "5";
                                  //oOrder.getLines().getUserFields().getFields().item("Quantity").setValue(new Integer(2));
                                  System.out.println(str);
                                  int result = oOrder.update();
                                  str += "6" + result;
                                  if (result == 0) {
                                         System.out.println("successfully updated");
                                         company.disconnect();
                                  } else {
                                         company.getLastErrorDescription();
                                         System.out.println(
                                                 "Error :" + company.getLastErrorDescription());
                                         company.disconnect();

    If you are using SBP 2004 there are many threads on this forum talking about bugs when updating sales order lines through DI API. This issue was supposed to be fixed with patch level 45 for 2004 which was recently released.
    If u are using 2005 or SP1 I think you may have found a new bug.

  • Withholding TAX - AP INVOICE through DI API

    Hi Experts,
             I am posting AP INVOICE through DI API. When am posting WITHHOLDING TAX for AP INVOICE am getting error like "Total  taxable amount of all rows exceeds the base amount [pch5.taxbleamt]". My code
                            APINVOICE.WithholdingTaxData.WTCode = ORec1.Fields.Item("WTCode").Value
                            APINVOICE.WithholdingTaxData.WTAmount = ORec1.Fields.Item("WTAmnt").Value
                            APINVOICE.WithholdingTaxData.Add()
    Please help me to solve this issue.
    Thanks in advance,
    Jeevan.

    Hi
    The below code can be used to add WT tax, But ensure that BP having the WTCode mapped.
       APINVOICE.WithholdingTaxData.WTCode = "TC-2"
            APINVOICE.WithholdingTaxData.Add()
    TC-2 is the WTCode mapped to Vendor i chose to add A/P invoice thro DI API.
    Regards,
    Tamizh.

  • Message Alter Overview  through DI API

    How do I get the code of selected message from my inbox in Messge/Alter overview window through DI API

    Hi Edward,
    Sorry I was busy last week and could not check your message. I got it to get the alertcode from alert/mesage overview screen. I just generated a message with three message data columns through DI API with link on two of the columns. I am just wondering how I would handle those links from Alert/Messge overview window to open my SAP Addon documents which are created in .NET and not using UDO's
    Thanks and Regards,

  • Creating SubField Types through DI-API

    Hi,
    I am trying to create SubFieldType of type Quantity through DI API, but it is not creating the SubFieldType. I am using the below code
    DBUpdate.AddFieldToTable(oCompany, "IS_INSROWS", "RejQty", "Rejected Quantity", SAPbobsCOM.BoFieldTypes.db_Numeric, 11,  SAPbobsCOM.BoFldSubTypes.st_Quantity)
    Public Function AddFieldToTable(ByVal oCompany As SAPbobsCOM.Company, ByVal TblName As String, ByVal FldName As [String], ByVal FldDesc As String, ByVal fType As SAPbobsCOM.BoFieldTypes, ByVal fSize As Integer, _
            ByVal subType As SAPbobsCOM.BoFldSubTypes) As Boolean
            Dim oUserField As SAPbobsCOM.UserFieldsMD
            Try
                Dim RetVal As Integer, ErrCode As Integer
                Dim ErrMsg As String
                oUserField = DirectCast(oCompany.GetBusinessObject(SAPbobsCOM.BoObjectTypes.oUserFields), SAPbobsCOM.UserFieldsMD)
                oUserField.TableName = TblName
                oUserField.Name = FldName
                oUserField.Description = FldDesc
                oUserField.Type = fType
                oUserField.SubType = subType
                'oUserField.Size = fSize;
                oUserField.EditSize = fSize
                RetVal = oUserField.Add()
                If RetVal <> 0 Then
                    oCompany.GetLastError(ErrCode, ErrMsg)
                    If RetVal = "-2035" Then
                        Return True
                    End If
                    Return False
                Else
                    Return True
                End If
            Catch ex As Exception
            Finally
                System.Runtime.InteropServices.Marshal.ReleaseComObject(oUserField)
                oUserField = Nothing
                GC.Collect()
            End Try
        End Function
    Regards,
    Noor hussain

    Hi Minhas,
    Thanks a lot for your reply. What about percentage, amount,rate and price in what type does this come ?
    Noor hussain

  • How to register UDT into UDO through DI API?

    Hi All
    I am creating User Data tables and fields by using an Add on through DI API.
    Now i want to register these tables and fields into User Defined object in SAP B1 using add on through DI API.
    What are the possible ways for this?
    And can you provide me sample codes?
    Thanks in advance.

    UDO should be built on top of a UDT. So you need to create the UDT first and
    then the UDO. You need to use the metadata objects available in DI API, i.e.
    objects like UserTablesMD, UserFieldsMD, UserObjectsMD. All of these are
    fully documented in the SDK Help.

  • Can Not Create Serviceable Item Through DI API

    Hi Experts,
    My Client is using SAP 8.81 PL0 ,I am creating Serviceable Item through DI API, using following code
    oItems = (SAPbobsCOM.Items)SBOAddOn.SBOCompany.GetBusinessObject(SAPbobsCOM.BoObjectTypes.oItems);
    oItems.ItemClass = SAPbobsCOM.ItemClassEnum.itcService
    When I am going to Add it throw the msg ,ServiceCat is blank
    In DI object I am not able to find the service category kindly help me out.
    Thanks
    Edited by: Anup Kharwar on Feb 21, 2012 5:40 AM

    Hi,
    The SDK helpfile has this to say about the itemClass property:
    SDK helpfile:
    Remarks
    The ItemClass property is applicable for cluster B (country-specific for Brazil only).
    For example in the Finnish localization we do not have a field in the Item Master Data window for ItemClass. We do have the field ItemType
    Does your localization have a field for itemClass anywhere in the B1 client ?
    Regards,
    Johan

  • Creating A/R Reserve Invoice through DI API

    Hello everyone,
    I am trying to create a A/R Reserve invoice through DI API, for that i have to set invoice documnet property is:
    oInvoice.WareHouseUpdateType = SAPbobsCOM.BoDocWhsUpdateTypes.dwh_CustomerOrders;
    but it throws a exception -
    The object does not support this method, Or method not implemented yet.
    please anyone have sample code for add A/R reserve invoice or any solution for that, provide me.
    Thanks,
    Nikhil

    Hi,
    The Reserve Invoice is coming in the 2007 Version.
    See here:
    /people/community.user/blog/2007/01/24/whats-new-in-sdk-2007-a
    Kind Regards,
    Owen

  • Set default invoice addressname through DI-API

    Can anyone tell how to set the default invoice (billing) address name (description) on a Business Partner using the DI-API? The default billing address is set through the address, city, etc. fields on the Business Partner (unlike the supplementary addresses which are maintained through the BPAddresses object). But how can you set the addressname of the billing address (which is "Bill-to" by default in the English version). On the database-level this is the field "BillToDef" but I can't find it in the DI.

    Use ShipToDefault...
    Example in VB
    Dim oBP As SAPbobsCOM.BusinessPartners
    Set oBP = gCompany.GetBusinessObject(SAPbobsCOM.BoObjectTypes.oBusinessPartners)
    oBP.GetByKey ("C007")
    Address = oBP.ShipToDefault

Maybe you are looking for