API for creating a new folder in Shared Queries through C # in TFS 2013

Hi ,
          Is it possible to create a new folder in "Shared Queries" in Team foundation Server 2013 by using C#. I'm able to access the queries and even modify them by using the StoredQuery class and
the QueryText function . We had a case to create a new folder in the Shared Queries part of the project.
          I have been and I am still looking for classes / api's that will enable me to do this .Any pointers to help me would be greatly appreciated.
         Do let me know if I have to provide more information.
Regards,
Arun

Hi Arun,  
Thanks for your post.
To create new folder under Shared Queries, you can try below code snippet:
TfsTeamProjectCollection tfs =
new
TfsTeamProjectCollection(new
Uri("collectionURL"));
tfs.EnsureAuthenticated();
WorkItemStore workitemstore = tfs.GetService<WorkItemStore>();
var queryHierarchy = workitemstore.Projects["teamprojectname"].QueryHierarchy;
QueryFolder currentLocation = queryHierarchy["Shared
Queries"]
as
QueryFolder;
var folder =
new
QueryFolder("foldername");
currentLocation.Add(folder);
currentLocation = folder;
queryHierarchy.Save();
For more information, please refer to the example in this article:
http://bzbetty.blogspot.in/2012/12/tfs-automation-automatically-creating.html.
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.

Similar Messages

  • API for creating User in Oracle E-Business Suite through BPEL

    Hello,
    I would like to use a BPEL process to create a new User in Oracle EBS. In the {color:#0000ff}Integration Repository {color}I was able to find an API called FND_USER_PKG/LOAD_ROW that creates/updates Application's User data. Is this the API I should be using? If so, I would like to better understand how to use this API. What are the required input parameter?
    I have created a simple BPEL process and added an Oracle Application Service, which uses this FND_USER_PKG/LOAD_ROW API. I set the following parameter before Invoking the Oracle Application Service: X_USER_NAME, X_ENCRYPTED_USER_PASSWORD and X_START_DATE. When I run the BPEL process I get the following error. I suspect that I am not passing all the required input parameters. Does anyone have any sample data I can use to get this API to load correctly? If I am using the wrong API, please let me know.
    Thank you kindly!
    Christine
    - <input>
    - <Invoke_OracleEBS_SecurityUser_InputVariable>
    - <part xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" name="InputParameters">
    - <InputParameters xmlns:db="http://xmlns.oracle.com/pcbpel/adapter/db/APPS/FND_USER_PKG/LOAD_ROW/" xmlns="http://xmlns.oracle.com/pcbpel/adapter/db/APPS/FND_USER_PKG/LOAD_ROW/">
    <db:X_USER_NAME>
    CRILEY
    </db:X_USER_NAME>
    <db:X_ENCRYPTED_USER_PASSWORD>
    CRILEY
    </db:X_ENCRYPTED_USER_PASSWORD>
    <db:X_START_DATE>
    2009-01-01
    </db:X_START_DATE>
    </InputParameters>
    </part>
    </Invoke_OracleEBS_SecurityUser_InputVariable>
    </input>
    - <fault>
    - <bindingFault xmlns="http://schemas.oracle.com/bpel/extension">
    - <part name="code">
    <code>
    20001
    </code>
    </part>
    - <part name="summary">
    <summary>
    file:/E:/product/10.1.3.1/OracleAS_1/bpel/domains/default/tmp/.bpel_OracleEBS_OnBoarding_1.0_d71e16636aa9ff51b9975926da6faeb2.tmp/OracleEBS_SecurityUser.wsdl [ OracleEBS_SecurityUser_ptt::OracleEBS_SecurityUser(InputParameters) ] - WSIF JCA Execute of operation 'OracleEBS_SecurityUser' failed due to: Error while trying to prepare and execute an API.
    An error occurred while preparing and executing the APPS.FND_USER_PKG.LOAD_ROW API. Cause: java.sql.SQLException: ORA-20001: APP-FND-02600: Unable to create user CRILEY due to the following reason(s):
    Unabled to call fnd_ldap_wrapper.create_user due to the following reason:
    ORA-20001: Unabled to call fnd_ldap_wrapper.create_user due to the following reason:
    An unexpected error occurred. Please contact your System Administrator...
    ORA-06512: at "APPS.APP_EXCEPTION", line 72
    ORA-06512: at "APPS.FND_USER_PKG", line 783
    ORA-06512: at "APPS.FND_USER_PKG", line 916
    ORA-06512: at "APPS.FND_USER_PKG", line 1035
    ORA-06512: at "APPS.FND_USER_PKG", line 645
    ORA-06512: at line 1
    Edited by: Christine Riley on Jan 22, 2009 11:00 AM
    Edited by: Christine Riley on Jan 27, 2009 1:07 PM

    Hello,
    I would like to use a BPEL process to create a new User in Oracle EBS. In the {color:#0000ff}Integration Repository {color}I was able to find an API called FND_USER_PKG/LOAD_ROW that creates/updates Application's User data. Is this the API I should be using? If so, I would like to better understand how to use this API. What are the required input parameter?
    I have created a simple BPEL process and added an Oracle Application Service, which uses this FND_USER_PKG/LOAD_ROW API. I set the following parameter before Invoking the Oracle Application Service: X_USER_NAME, X_ENCRYPTED_USER_PASSWORD and X_START_DATE. When I run the BPEL process I get the following error. I suspect that I am not passing all the required input parameters. Does anyone have any sample data I can use to get this API to load correctly? If I am using the wrong API, please let me know.
    Thank you kindly!
    Christine
    - <input>
    - <Invoke_OracleEBS_SecurityUser_InputVariable>
    - <part xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" name="InputParameters">
    - <InputParameters xmlns:db="http://xmlns.oracle.com/pcbpel/adapter/db/APPS/FND_USER_PKG/LOAD_ROW/" xmlns="http://xmlns.oracle.com/pcbpel/adapter/db/APPS/FND_USER_PKG/LOAD_ROW/">
    <db:X_USER_NAME>
    CRILEY
    </db:X_USER_NAME>
    <db:X_ENCRYPTED_USER_PASSWORD>
    CRILEY
    </db:X_ENCRYPTED_USER_PASSWORD>
    <db:X_START_DATE>
    2009-01-01
    </db:X_START_DATE>
    </InputParameters>
    </part>
    </Invoke_OracleEBS_SecurityUser_InputVariable>
    </input>
    - <fault>
    - <bindingFault xmlns="http://schemas.oracle.com/bpel/extension">
    - <part name="code">
    <code>
    20001
    </code>
    </part>
    - <part name="summary">
    <summary>
    file:/E:/product/10.1.3.1/OracleAS_1/bpel/domains/default/tmp/.bpel_OracleEBS_OnBoarding_1.0_d71e16636aa9ff51b9975926da6faeb2.tmp/OracleEBS_SecurityUser.wsdl [ OracleEBS_SecurityUser_ptt::OracleEBS_SecurityUser(InputParameters) ] - WSIF JCA Execute of operation 'OracleEBS_SecurityUser' failed due to: Error while trying to prepare and execute an API.
    An error occurred while preparing and executing the APPS.FND_USER_PKG.LOAD_ROW API. Cause: java.sql.SQLException: ORA-20001: APP-FND-02600: Unable to create user CRILEY due to the following reason(s):
    Unabled to call fnd_ldap_wrapper.create_user due to the following reason:
    ORA-20001: Unabled to call fnd_ldap_wrapper.create_user due to the following reason:
    An unexpected error occurred. Please contact your System Administrator...
    ORA-06512: at "APPS.APP_EXCEPTION", line 72
    ORA-06512: at "APPS.FND_USER_PKG", line 783
    ORA-06512: at "APPS.FND_USER_PKG", line 916
    ORA-06512: at "APPS.FND_USER_PKG", line 1035
    ORA-06512: at "APPS.FND_USER_PKG", line 645
    ORA-06512: at line 1
    Edited by: Christine Riley on Jan 22, 2009 11:00 AM
    Edited by: Christine Riley on Jan 27, 2009 1:07 PM

  • In Mavericks, every time I try to create a new folder on the drive I  get a prompt for my password. I checked Get Info on the main drive and under Sharing

    I got a new 27" iMac with 10.8.5 and migrated a 10.6.8 system and files.  It was working fine. After about 2 weeks I was looking at the Sharing & Permissions and saw an account "wheel".  I mistakenly (I NOW know it was a mistake) changed the permission to no access and subsiquenty could not boot the computer. I had an older iMac so I built a boot disk with the Mavericks installer on it. Booted the computer and restored from a Time Machine backup previous to the change of permissions of the "wheel" account. I went ahead and did a clean install of Mavericks
    The computer is now running with Mavericks installed and I am rebuilding.  When I go to create a new folder on the system drive I get prompted for a pasword.
    When I checked the permissions and sharing on the main drive it tells me "you can only read".
    I am logged in with an admin account. I have run Disk Utiltiy and Tech Tool Pro's  permission verify and repair. Given what happend last time I changed permissions I am reluctant to make any changes.
    Anyone have an idea as to what I should do.
    Thanks in advance.

    Here is the dialoge box. My account does not appear. Can I just add my account or is there some other problem?

  • I have 2 auxillary disk drives for my MacBokk Pro. Time Machine uses one for backup and I use the other for storage, but I am unable to create a new folder or drag and drop files or folders to the aux drive.

    I am unable to create a new folder on either of my auxillary disk drives.  I can access the files and folders that were there when I transferred one of the drives from a PC.  Time machine uses one for backup and I want to use the other to store photos which are large files.  An help would be appreciated.

    Thanks for the reply.  If I reformat the drive will I be able to access the files on it from the MAC.  I do not share the drive with a PC.  The files were originally created on a PC which I no longer use.  I do want to continue to access the files put there by the PC.  I would like to not have to copy them over to the MAC hard drive just to use them.  The second aux drive is new and works fine because it was formatted by the MAC.  I can drag and drop files there and work with just as if they were on the internal drive.

  • How can I create a new folder in Word for Mac ?

    How can I create a new folder in Word for Mac?

    You don't do this in Word. You do it in the OS X Finder.
    All you need do in Word is open the file, then select Save As from Word's File menu. Change the destination to your new folder then click on the Save button.
    The Finder method is much faster if you have a number of files you want to move. Just remember that to open those moved files in Word, you will have to change the directory from which you will open those files.

  • Created a new folder in bookmarks; when try to add new bookmark, new folder does not appear in drop down menu; using safari for windows

    created a new folder in bookmarks; when try to add new bookmark, new folder does not appear in drop down menu; using safari for windows

    You are using an older version of firefox, upgrade your browser to Firefox 8 and try
    * getfirefox.com

  • How do I create a new Folder for each test report based on Serial number?

    I want to be able to create a new folder for each test report based on serial number. Each time a UUT is tested, I want the report to go to the appropriate folder. What is the best way to do this?
    Thanks

    Hello Tman,
    This is a slightly tricky question. The reason being, the report options like the report path etc, are set before you see the serial number prompt when you run your UUT. There might be other ways of getting around this, but a quick solution would be modifying the process model.
    I modified the PreUUT callback to set the report options. I passed the reportOptions as a parameter to this sequence. In the PreUUT sequence, I set the following fields:
    Parameters.ReportOptions.GeneratePath=False
    Parameters.ReportOptions.ReportFilePath= "c:\\"+ Locals.SerialNumber +"\\report.xml"
    I hope this would give you an idea.
    SijinK

  • Exist any API to Create a new Costing for employee?

    I want to add new Costing for employees using API's ,
    Exist any API to Create a new Costing for employee?

    Hi
    there are no public APi's to create the costing in Oracle,
    u can use CST snapshot interfaces and run the standard import costs concurrent program

  • Creating a New Folder in Windows Registry by java coding

    Good morning,
    hi to all,
    how can I create a New folder in Window Registry using Java coding. Can anybody help me out pls.
    I begin waiting for ur reply.
    Thanx

    Why do you feel you need to write to the Windows registry directly? Take a look at the Preferences class.
    {color:#0000ff}http://java.sun.com/javase/6/docs/api/java/util/prefs/Preferences.html{color}
    luck, db

  • Unable to create a new folder in document library of SharePoint 2010

    Hi There,
    Need some help regarding an issue which is occurring after migration from SP 2007 to 2010.
    We have recently migrated a site to SP 2010, after migration whenever i tried to create a new folder in a document library it gives me an error message below
    SPException: Can not find the form to create default data for the list
        Microsoft.SharePoint.Utilities.SPUtility.ThrowSPExceptionWithTraceTag (UInt32 TagId, ULSCat traceCategory, resourceId String, Object [] resourceArgs) 28098007 
        Microsoft.SharePoint.ApplicationPages.ListFormRedirect.InitializeQueryStringMembers () 1764 
        Microsoft.SharePoint.ApplicationPages.ListFormRedirect.OnLoad (EventArgs e) +25 
        System.Web.UI.Control.LoadRecursive () 66 
        System.Web.UI.Page.ProcessRequestMain (Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) 2428
    All the document libraries which are created with the custom list template has this problem. 
    Moreover, I have verified and found Upload.aspx page is available in Forms folder of a document library. 
    Can someone help me in resolving this issue.
    Thank you in advance.
    Vikram
    vikram padigala

    Hi,
    All the document libraries which are created with the custom list template has this problem. 
    Did you mean you had a custom library template?
    Did the issue occur in the library which created use the out of the box template, such as use the Document Library template?
    You can check with the OOB template library to test whether they had the same issue.
    If the OOB template library works well, the issue may be related to the custom library template.
    You can try to recreate a new custom template to check whether it works.
    To quickly and accurately find the issue , you can also check the event log and ULS log to see if anything unexpected occurred.
    For SharePoint 2010, by default, ULS log is at
    C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\14\LOGS
    Thanks & Regards,
    Jason
    Jason Guo
    TechNet Community Support

  • Creating a new folder sometimes drives me wonky

    Have any of you found a work around for this: When I'm in the hierarchical view in the finder and want to create a new folder in one of the panes, the OS can make it difficult. If the pane is completely filled with files or folders, when you control click to bring up the context menu, the OS assumes that you want to pick a choice dealing with whatever file you were hovering over at the time.
    In order to create a new folder in that pane, I either have to do something wonky like create the folder on the desktop and drag it in, or expand the window to get blank space at the bottom of the file list.
    Is there a way to create a folder directly in a filled pane?

    You can also right click on the top of a finder window choose customize from the contextual menu & drag the new folder icon to the top of the finder window.
    Also click on the action icon (gear icon) & choose new folder from the drop down menu.
    Message was edited by: Joe Salafia

  • Creating a new folder in a SharePoint library using C# Windows Application.

    I have tried to create a folder within a SharePoint document library. The coding is as follows.
    Text Box Name: txtNewFolderName
    Button Name : btnCreateNewFolder
    private void btnCreateNewFolder_Click(object sender, EventArgs e)
    //String parameters for site URL and site name
    const string siteUrl = "http://thekingsbury/";
    const string siteName = "/SiteDirectory/thekingsbury/";
    //Freeze UI
    Cursor = Cursors.WaitCursor;
    btnCreateNewFolder.Enabled = false;
    //Use SPSite constructor to assign site collection based on top-level URL
    SPSite siteCollection = new SPSite(siteUrl);
    //Assign target site (SPWeb instance) based on site name
    SPWeb site = siteCollection.AllWebs[siteName];
    //Create an instance of SPDocumentLibrary based on the named doc library list
    SPDocumentLibrary docLibrary = (SPDocumentLibrary)site.Lists["Test Library"];
    //Create instance of SPFolderCollection and add a named folder based on forms input,
    //then update library to reflect added folder
    SPFolderCollection myFolders = site.Folders;
    myFolders.Add("http://thekingsbury/Test%20Library/" + txtNewFolderName.Text + "/");
    docLibrary.Update();
    //UI clean-up
    Cursor = Cursors.Default;
    btnCreateNewFolder.Enabled = true;
    Site URL :
    http://thekingsbury/
    Site Name: thekingsbury
    Document Library  : Test Library
    My problem is when I click the button it gives an error as the following.
    The Web application at http://thekingsbury/ could not be found.
    Verify that you have typed the URL correctly.
    If the URL should be serving existing content, the system administrator may need to add a new request URL mapping to the intended application.
    The error shows at the following statement.
    "SPSite siteCollection = new SPSite(siteUrl);"
    I created both Windows & Web solutions and the result was the same.
    Note: I have add the reference to the SharePoint using the Microsoft.SharePoint.dll file. And used the "using Microsoft.SharePoint;" statement.
    Please can someone help me on this matter.It's a real paint to me.

    The complete solution using an InfoPath 2010 form is as the below.
    using Microsoft.Office.InfoPath;
    using System;
    using System.Xml;
    using System.Xml.XPath;
    using Microsoft.SharePoint;
    using Microsoft.SharePoint.Client;
    using Microsoft.SharePoint.Linq;
    namespace Create_Folder_In_SharePoint_Library
    public partial class FormCode
    public void InternalStartup()
    ((ButtonEvent)EventManager.ControlEvents["btnCreateFolder"]).Clicked += new ClickedEventHandler(btnCreateFolder_Clicked);
    public void btnCreateFolder_Clicked(object sender, ClickedEventArgs e)
    SPSite mySite = new SPSite("Http://thekingsbury/");
    SPWeb myWeb = mySite.OpenWeb();
    //Code to retreive the new library.
    XPathNavigator xLibraryName = MainDataSource.CreateNavigator();
    String NewLibraryName = xLibraryName.SelectSingleNode("/my:myFields/my:LibraryName", NamespaceManager).Value;
    //Code to retreive the library description.
    XPathNavigator xLibraryDesc = MainDataSource.CreateNavigator();
    String NewLibDesc = xLibraryDesc.SelectSingleNode("/my:myFields/my:LibraryDescription", NamespaceManager).Value;
    //Code to retreive the new folder name.
    XPathNavigator xFolderName = MainDataSource.CreateNavigator();
    String NewFolderName = xFolderName.SelectSingleNode("/my:myFields/my:FolderName", NamespaceManager).Value;
    //Creating the new library.
    myWeb.Lists.Add(NewLibraryName, NewLibDesc, SPListTemplateType.DocumentLibrary);
    myWeb.Update();
    //Creating the new folder within the new library.
    SPDocumentLibrary newDocLibrary = (SPDocumentLibrary)myWeb.Lists[NewLibraryName];
    SPFolderCollection newFolders = myWeb.Folders;
    newFolders.Add("http://thekingsbury/" + NewLibraryName + "/" + NewFolderName + "/");
    newDocLibrary.Update();
    I think everyone can use this.
     When you are generating a folder always try to avoid reserved characters  : ; # $ % ^ a and suchlike.

  • When I create a New Folder (on the desktop or in Finder), the system uses the Generic Document Icon instead of the Generic Folder Icon. How can I change this back?

    When I create a New Folder (on the desktop or in Finder), the system uses the Generic Document Icon instead of the Generic Folder Icon. How can I change this back?
    All of a sudden I noticed that most of the folders on my computer were no longer using the folder icon, but the generic document icon. I had to manually change back the icon being used by opening Get Info for each folder and copying and pasting the generic folder icon from some folders that remained unchanged. Now whenever I create a New Folder (right click -> "New Folder"), the icon that shows up is the generic document icon (white page with top right corner turned down). And I have to manually change it so it shows up as a folder in Finder or on my desktop. I don't know why or how this switch happened. All of the folders now on my computer look ok, but I need to change the default so when I create a New Folder it uses the correct icon.
    I have also Forced Relaunch of my Finder and rebooted the system. I downloaded Candybar but am not sure what will fix anything, so I haven't proceeded.
    Anyone know how I can do this? Thanks.

    Anyone?

  • How can I create a new folder in de tool bar?

    I have several bookmarks of news papers and magazines located in the tool bar. Since they take space I need for other bookmarks, I need to place them in a folder which will also be located in the tool bar. How can do to achieve that?...I did it once but I forgot how I did it.

    Just like you would create a new folder anywhere. Open the drive's icon from your desktop or the Finder, and click shift-command-N. (Or use the Finder menu if you prefer - File - New Folder).
    If you can't create a folder, your drive may be the wrong format (you can't write to a Windows/NTFS formatted drive, for example). You'll have to back up any files you have on there, and then use Disk Utility to reformat it to Mac Extended (if it will only be used on a Mac) or MS-DOS format (if you want to share it with a PC).
    Matt

  • How can I create a new folder in an external disk that is connected via USB to my Mac?

    How can I create a new folder in an external disk that is connected via USB to my Mac?

    Just like you would create a new folder anywhere. Open the drive's icon from your desktop or the Finder, and click shift-command-N. (Or use the Finder menu if you prefer - File - New Folder).
    If you can't create a folder, your drive may be the wrong format (you can't write to a Windows/NTFS formatted drive, for example). You'll have to back up any files you have on there, and then use Disk Utility to reformat it to Mac Extended (if it will only be used on a Mac) or MS-DOS format (if you want to share it with a PC).
    Matt

Maybe you are looking for

  • Is There a Way to Clear the Screen ???

    I am building a Class that is text (command line) based. Is there anyway to clear the screen (output) in such a class. Similar to what CLS does in DOS...

  • CRM item category determination

    Hi, When copying a sales order, which includes a BOM, from R/3 to CRM the item category for the lower level item is not correct. This appears to be because the higher level line is not recognised. The item category determination is defined to select

  • PassingCustomer Address in IDOC

    Hi gurus, Requirement is to pass Address IDOC along with customer IDOC DEBMAS06. For DEBMAS06 i have already done change pointer settings and it is working fine. What should i do for triggering Address IDOC (message type ADRMAS,ADR2MAS,ADR3MAS) Regar

  • Regardind shipping coditions

    Hi friends, Hope u all knows that shipping conditions copy into sales documents from sales documents or CMR sold to party.    but iam having 2 ship to partys with two diffrent shipping conditions for one sold to party..when iam processing a sales ord

  • Uninstall third party software

    How do I uninstall third party software. I want to make sure all the application has been deleted.