Duplicating item in SBO

Hello There
Is there a way to duplicate an item using the DI?
for example, I want to create a new code item, and assign it all the attributes of another item
rgds
hagai

I have tried my solution and have found that it is possible, but not without a few catches....
1. You should set the XmlExportType of your company object to BoXmlExportTypes.xet_ExportImportMode
2. If you have UDF's on your item this is a problem. You should remove the tags for these UDF's. To my opinion this is A BUG!
Below the code I have used (I tested to copy item from one company to another, but it should also work within the same company...
<code>
        Company1.XmlExportType = BoXmlExportTypes.xet_ExportImportMode
        Company2.XmlExportType = BoXmlExportTypes.xet_ExportImportMode
        sourceItem = Company1.GetBusinessObject(BoObjectTypes.oItems)
        targetItem = Company2.GetBusinessObject(BoObjectTypes.oItems)
        sourceItem.GetByKey("1010101")
        sourceItem.SaveXML("c:\1010101.xml")
        If targetItem.GetByKey("1010101") Then
            targetItem.Browser().ReadXml("c:\1010101.xml", 0)
            rc = targetItem.Update()
        Else
            targetItem.Browser.ReadXml("c:\1010101.xml", 0)
            rc = targetItem.Add()
        End If
        If rc <> 0 Then
            MsgBox(comp2.GetLastErrorCode.ToString + "/" + comp2.GetLastErrorDescription)
            End
        End If
</code>
Hope this helps you.

Similar Messages

  • Don't understand 'Delete unused media from duplicated items'

    Can anyone help with this?
    I have a large project spanned across 2 drives and want to tidy it all up to a third drive. Using Media Manager (with no specific sequences selected) it says the project size is 350Gb. If I check the 'Delete unused media from duplicated items' box it reduces to 267GB.
    Given that I'm not selecting a particular sequence edit I assume it is aimaing to manage all files. So what is the variation of 84GB. If I opt for the 267GB, what is in the 84GB that I'm about to loose. I haven't duplicated anything so unsure what I'll be losing?

    You won't lose anything if you copy the project with Media Manager. Test the copy afterwards to make sure it is exactly what it should be. Once you are happy with it, the original can be deleted.
    You can make the copy even smaller if you exclude render files. It will have to be re-rendered only if you have to revisit the project at some point. Use the space saved for something else until it is really needed.

  • Duplicated items, Unlinking files, and Importing an updated project

    My brother and I are co-editing a project in Premiere Pro CC because it is so large. However, we've been finding difficulties when importing each others edits. We have it set up so that we work on different sequences of the project at a time. When I import a sequence, it also imports all of the files used in the sequence. The problem is that this creates duplicates in my project since we're using the same files. It seems like there isn't an easy way to re-link the source material from the imported sequence to the existing files already located in my project. Whenever I try to delete a duplicated item, it removes it from the updated sequence. I have to manually click on each file, make offline, then somehow relink it to the file I want it to be linked to. This is a big hassle for us and I'm hoping that there is some simple, massive relinking option that gets rid of these duplicates.

    When I import a sequence, it also imports all of the files used in the sequence.
    That happens only when you import the entire project.  When you import just a sequence, it will bring in only the media not already in the project.

  • Duplicated Itemized Expenses in iExpenses

    We have noticed that when employees submit an expense report that contain itemized expenses, the itemized expense amounts are duplicated. The reimbursable amount shows the correct amount, however, the total expenses includes the duplicated item(s). For example:
    ITEM EXP TYPE AMOUNT JUSTIFICATION
    Item# 3 Hotel $200
    Item# 3-1 Hotel $50 Parking
    Item# 3-2 Hotel $150 Hotel
    Expense report amount- $200
    Original eligible amount- $400
    As in this example, the total expenses would show as $400, however, the actual reimburseable expenses would show as $200. This has caused some issues because expense reports are routed for approval via the over-stated amount.
    Does anyone know if this is a bug?
    As an FYI, I made a correction to Item# 3-1 to correct the expense type from Hotel to Parking and it adjusted the amounts so that the expense report shows for the correct amounts. Thus, it corrected the approval workflow as well. I was thinking that if an employee itemizes an expense but does not change at least one of the expense types, that it duplicates the charges for some reason. Sound like a valid error explanation?
    Thanks,
    Erik

    Both pay is with Credit Transactions. If the transaction is of both pay type the invoice to be paid to the card issuer is split out of the original Expense Report, a new report is created and invoiced. If you are using R12 a Payment Request is created for the Credit Card Issuer.
    Please browser through the implementation guide for details.

  • Duplicated items in menu

    Hello
    The main menu (i.e. beneath the Apple in the top right corner of the screen) is showing duplicated items e.g. Restart appears twice, as does Log Off, Shut Down etc.
    They all appear twice.
    Any ideas.
    Thanks!
    iBook    

    Hi again demystifyme, try ⌘ F5 or as you've an iBook ⌘fnF5.
    You have inadvertently turned on VoiceOver. in System Preferences>Universal Access with the above key combo.
    Good luck,
    Adrian
    Message was edited by: Adrian

  • HT6030 I am still having issues with GMAIL not syncing or moving it's duplicating items as I move them to folders and my inbox is overflowing now..... help?

    according to the last update it was supposed to fix the gmail issue in apple mail with syncing/archiving/etc. now it is not only duplicating but still not syncing properly and moving emails once I've moved them/ My inbox is overflowing and this is NOT acceptable.

    as rediculous as this is, I enabled "all mail" under the labels, then went into the actual apple mail settings and checked some box about updateing immediately (for deleted items) . then I had to quit mail then open it back up  - it "appears" to have synced properly. I'll let you know if it all comes back, but this is really a pain in the butt, I swapped from Entourage a few months back because it started acting weird with gmail.
    anyone have any other mail options if this continues to not work? I don't want to have to pull gmail in my browser to move read items each day.
    thanks for all the help.

  • PanelNavigation2 duplicating items on valuechanged

    Whenever a valuechanged event occurs on a page containing a panelNavigation2 components the items in the navigation menu are duplicated.
    The extra items subsequently disappear when any non-value changed event occurs.
    Mysterious? Help anyone?

    Thanks for the input. I tried unchecking the 'Copy Files to iTunes Media folder when adding to library' box, and that did the opposite of what I wanted: put the file on the original Hard Drive and not on the alternative drive. Why is it insisting on copying all the files into the original location? If I put an alias of the correct iTunes music folder in place of the original, will that help?

  • Find Finder Items duplicating items

    I am trying to select files from a folder based on date created.
    I am being able to do it with Find Finder Items but the result is duplicting files on folders and files itself.
    How can I filter to have just 1 copy of each file?
    Thanks

    Sorry,
    Let me try to be more specific.
    I need to copy to a folder all music and videos created by my itunes on my music folder since June 1st 2008.
    As I run the copy finder items on my Music folder there are many items that are present on the results there are duplicate. i.e. I have a specific TV Show from House as a File and at the same time I have the hole House season as a folder that has the same file inside.
    I need to have this file ( and all others that are duplicate) only once.
    Is it possible to either filter it or have the results right in the first place?
    Thanks

  • Duplicating items in subcontracting challan, referring Tranfer posting doc.

    Hi all,
    If I issue 2 items thru MB1B ,for a subcontracting vendor
    and when iam creating subcontracting challan referring this mat docu(tranfer posting), system is defaulting 4 entries(in the challan) , two for each component.
    I want to know
        whether it is a std functionality, or any error in the process?
    thanks in advance
    Krishna

    Issue is resolved.
    Thanks

  • Outlook integration create duplicated contact

    Hello All:
        When I run the synchronization in outlook integration. It duplicate customer contacts after the first run. Now I am not sure if I should run it again as it may duplicated it over again. Is this a setting inside SBO or inside outlook?
    Sincerely Yours

    Dear,
    For your issue kindly refer to note 911283 below:
    Symptom
    When do a synchronization in Outlook Integration, the duplicated items
    will be created, even though it has been synchronized before.
    Other terms
    SAP Business One; Add-On; AddOn; B1; SBO; Outlook Integration; Outlook;
    OI; Activity; Sync; synchronization
    Reason and Prerequisites
    This is program bug of SAP Business One Add-On Outlook Integration.
    Solution
    This problem is fixed in SAP Business One Add-On Outlook Integration
    release version 6.70.2.20, also fixed in SAP Business One Add-On Outlook
    Integration release version 6.80.00.15. Download and install the patch
    of SAP Business One Add-On Outlook Integration from SAP Service Market
    Place will fix the problem.
    2005 SP00 PL15 & 2004 SP02 PL20 has fixed the issue.
    Regards
    Apple

  • Duplicate item does not validate it

    Hello
    when I use F3 key to duplicate a lookup item (has invisible foreign key item) the duplicated item does not fire When-Validate-Item trigger to brings it invisible foreign key, How to solve this problem?

    Use a key-dup-item trigger, and in it put:
    duplicate_item;
    set_item_property(:System.trigger_item,item_is_valid,property_false);
    validate(item_scope);Not sure if both of the last two lines are necessary. It may work with only one of them.

  • Why is iTunes trying to sync deleted items to iPhone?

    Hi,
    I own a MacBook Pro and an iPhone 4.
    When attempting to sync my music, iTunes tries to sync particular items twice. The result is that the second time it tries to sync it fails, and it results in a message "x items could not be synced see itunes for more information".
    Attempted Solutions:
    I erased all the music off my iPhone (having previously had it on synchronising particular playlists). However this left all the duplicated items that iTunes were trying to sync to the iPhone as showing as audio files on the summary tab and in the music tab. I can manually delete these if I select manually manage music however this comes back again when I press sync. I don't understand why it's trying to sync music (and taking up space on the iPhone summary tab) when I have de-selected synchronising any music at all.
    I have deleted the items in questions completely from my iTunes however iTunes still attempts to synchronise then when connected to the iPhone. They do not show in the Music App on the iPhone but they do show as greyed out entries on the music pane in iTunes under my iPhone's device name. Again I can delete these but upon synchronising my playlists by de-selecting manually manage music these items re-appear!
    Someone please help me!
    Thanks,

    Yea mine tends to do that too sometimes but most of the time I just eject my phone from iTunes if its not connected or I let it try to sync because I know it won't sync since my phone is not connected to any sort of power source.
    You could always try uninstalling and reinstalling iTunes if all else fails.

  • Can't delete duplicated desktop folders

    I somehow duplicated the few folders I have on my desktop, including the Macintosh HD and TimeMachine backup. The duplicated folders are empty but I cannot drag them and drop them into the trash. When I right click on those folders, they show much fewer options than the originals.
    The options are:
    New Folder
    Get Info
    Change Desktop Background
    Clean Up
    Clean Up By
    Sort By, and
    Show View Options
    The Clean Up By and Sort By options are:
    Name
    Kind
    Date Modified
    Date Created
    Size, and
    Tags
    I can only draw a box around the duplicated items with the cursor but the box disappears once I release the mouse. I am mystified how these folders and icons got duplicated and more mystified as to why I can't move them. I appreciate any help in advance.

    Open the Desktop & Screen Saver pane of System Preferences and change the desktop picture.
    (106732)

  • Duplicate Shopping Cart  line items  - Supplier doesnt get copied ?

    Hi,
    we are on SRM7  extended classic scenario and while we use the "Duplicate" option to copy the existing line items in a shopping cart then the supplier doesn't get copied to new line item, field remains blank? is it a standard behaviour?
    what are the steps needed to make this happen ? appreciate your help in this regard.
    Thanks,
    Maverick

    Hi
    In SRM , if you copy the line item all item data must copy including suppliers.
    step by step tell us
    like
    1 create a shopping cart describe requirement
    2. manually assigned a source of supply - assigned a vendor
    3. copy the line item into another one
    4. in the latest line item supplier was not copied.
    The behavior of copying/pasting or duplicating items in a SC is different depending on the status of the SC
    Note 1137292 - Inconsistency when duplicating items
    Muthu

  • Sales order duplicate item

    Hi,
    Can someone help and explain me why there's a duplicate item in my sales order.
    In the sales order document a variant component doubled from ITem 10, item 20 then ITEM 21 then item 30..... Irregularities of item number. The config was defaulted by 10's.
    EX.
    Item Material QTY Unit ItCategory
    10 Variant 1 pc YTM1
    20 componet A 200 in3 YTM2
    21 componet A 200 in3 YTM2<<<<----
    (duplicate of ITEM 21)
    30 Variant 1 in3 YTM2
    40 ................................................................
    50 ................................................................
    The config for numbering is by 10. What are the possible reasons why item 21 appeared?
    Please help
    Thanks,

    Hi Chrisell
    This problem you were facing because in VOV8 you have Item increment and Sub-item increment . Because of this you were getting the duplicating item in the sales order.Apart from that you might have maintained the BOM . because of that duplication item in the sales order is taking place .
    Kindly check the STPO & STPU tables wheather they are getting updated or not
    STPO --- BOM item data
    STPU ---   BOM sub-item data
    STAS --- BOM item selection
    Regards
    Srinath

Maybe you are looking for

  • Meid no longer working with ting after recent update

    Hey guys i have a 4s with an meid of 99000, was working fine then the recent update seems to have changed the meid or something because it was different then the one originally supplied to ting my provider, and it no longer works on any network it se

  • Error while doing GI to cost center (201 Mvt type)

    Hi, While I tried to do Goods Issue to Cost center through mvt type 201. I get the following error. "Account type K is not defined for document type WA" Kindly help reg it. Regards, Vimal

  • Takes a long time to find wireless network

    So for the past few months my (Santa Rosa) MBP will take an extremely long time to find a wireless network. This happens both at home and other places where I have connected in the past and am wanting to use a remembered network. It can take as long

  • Which roles do i have to get to execute a webservice

    Hi gurus , does any one know wich kind of roles and permissions do i have to get to execute a webservice? thanks.

  • Include program in Enhacements help me plz

    Hi All While we are enhancing the DS. We will write a logic in ZXRSAU01 to populate the data into those fields. Another thing is that we also write a include program at BW side like EXIT_SAPLR0_001 i had small query regarding this  why we write this