Answered BCS Action to edit item

  • Thursday, August 18, 2011 1:54 AM
     
     

    I am trying to add a BCS Action to edit an item in an external list

    The URL I am using for the action is:
    http://server/Lists/Customers/EditForm.aspx?ID={0}&IsDlg=1

    This would work fine if I was using a custom list but the external list doesn't use standard item IDs

    The external list is returning a BDCIdentity value e.g. “__bg40003300”

    Is there a way to reference or convert the BDCIdentity value to a standard ID so I can use it in the BCS Action URL?

     

All Replies

  • Thursday, August 18, 2011 7:14 AM
     
     
    Adding custom actions to external lists is a little more involved. Here's the MSDN reference: http://msdn.microsoft.com/en-us/library/ee558387.aspx
    AK
  • Friday, August 19, 2011 1:48 AM
     
     

    Thanks for the reply Abed but I am not trying to create a custom action. I am creating an BCS Action in the Business Data Connectivity Service Application as below:

    As you can see the parameter I entered was ID={0} but this doesn't work as it requires the BDCIdentity, not the Item ID

  • Friday, August 19, 2011 12:52 PM
     
     
    If you want to edit an item in the external list you should just add Updater method (operation) to your External Content Type.

    Dmitry

    Lightning Tools LogoLightning Tools Check out our SharePoint tools and web parts
  • Friday, August 19, 2011 2:04 PM
     
     Answered

    If the entity has edit method, you have the edit action available already. The BCS actions are for linking the external items to other urls (ex. lookup an address in Bing map). You can add a custom action (other than the existing one - ex. in the ribbon) b specifying (in SPD)  navigate to url:
    http://site/Lists/ext-list/EditForm.aspx?ID={ItemId}
    AK

  • Thursday, August 25, 2011 2:37 PM
     
     
    Did you find an aswer to this - i am facing the same issue. 
  • Thursday, November 17, 2011 11:03 PM
     
     

    Hi,

    I am facing the same problem. Could you please help me. What should I give in the URL?

    Thanks

  • Thursday, April 19, 2012 2:03 PM
     
     

    Nick, I have a similar problem. If you get an answer -- with sufficient detail to implement - please let me know. 

    I have a BCS list tied to a BCS related list. I have an action on the related list to create a new item. Works fine with no parameters. I get a blank new form. The new form allows me to enter two items and choose two items (exactly as intended). 

    What I would like to have is the necessary ?something=something string so that my user does not have to select one of the choice items (MNumber - set as a key / required value)

    User selects "New" from Actions. 
    Form Opens
    ID is automatically filled in based on the current item displayed in the BCS related list. 

    1. The string I supply is accepted. Does nothing.
    /intake/Lists/ContactsList/NewForm.aspx
    /intake/Lists/ContactsList/NewForm.aspx?MNumber=1234

    2. The string I supply is rejected - cannot be saved or insufficient values. 
    /intake/Lists/ContactsList/NewForm.aspx?MHICNumber={$MHICNumber} 

    Have also tried passing a string to one of the text fields (instead of the select field). Can't get that to work either. I've spent quite a few hours with the various boards. Nothing helpful. 

    Would also be nicer if I could set the New form to display in a pop-over window (as it does when I select New from the list view). Opening a new browser window is hokey and replacing the existing one is a pain. 


    Terri Morgan

  • Thursday, May 17, 2012 8:17 AM
     
      Has Code
    string bdcIdentity = "__bg40003300";
    int id = Convert.ToInt32((EntityInstanceIdEncoder.DecodeEntityInstanceId(bdcIdentity)[0]));


    • Proposed As Answer by Alexey Kornev Thursday, May 17, 2012 8:19 AM
    • Unproposed As Answer by Alexey Kornev Thursday, May 17, 2012 8:19 AM
    •