Display WCF exception detail in OOTB external list form submission

Hi,
I need a solution for the below scenario.
Scenario:
SharePoint OOTB external list consumes WCF service for CRUD operation.
When some exception happened during add/update operation using OOTB forms, External list form needs to capture and display error message and form should not be closed
Anandhan.S Remember to 'mark or propose as answer' or 'vote as helpful' as appropriate.

Hi,
Here is a blog for your reference:
Show exception details on the client side for WCF RESTful endpoints
http://sadomovalex.blogspot.kr/2011/06/show-exception-details-on-client-side.html
We can also customize the item forms and call the WCF service using Ajax, then catch the exception in client side using JavaScript.
Best Regards
Dennis Guo
TechNet Community Support

Similar Messages

  • ALV List Display With a Pushbutton in the basic list

    i have displayed the po details in teh basic list. I have used the double clicking functionality. It worked well. Now instead of double clicking, i will place the cursor on the po and click a push button. then it should show the other details.
    Can anyone please guide me how to create the pushbuttons on the basic list ?

    Hi,
       You create your own GUI status.Pass the name of GUI status to FM REUSE_ALV_GRID_DISPLAY.
    e.g.
      CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
        EXPORTING
          i_callback_program      = sy-repid
          CALLBACKPF_STATUS_SET = 'PF'
          i_callback_user_command = 'USER_COMMAND'
          i_grid_title            = text-020
          is_layout               = wa_layout
          it_fieldcat             = it_fieldcat[]
        TABLES
          t_outtab                = it_basic
        EXCEPTIONS
          program_error           = 1
          OTHERS                  = 2.
      IF sy-subrc <> 0.
        MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
                WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
      ENDIF.
    FORM PF.
    SET PF_STATUS 'P1'.
    ENDFORM.
    On pressing that button go to secondary list.

  • Error in sharepoint external list while creating record with same id (this id is primary key)

    Hi,
    I have created one external content type in sharepoint designer to insert/update/delete table data.
    This table contains Primary key constraint.
    Then I have added this external content type to Sharepoint out of box List.
    Insert/Update/Delete is working fine. But when I am trying to insert record with the same id which is already exist in table, page crashed and its giving me following error:
    “Violation of PRIMARY KEY constraint 'PK_tbl_Accounts'. Cannot insert duplicate key in object 'dbo.tbl_Accounts'.
    The duplicate key value is (1). The statement has been terminated.”
    So I want to handle this exception. Can we show any popup message to hide this error?
    Thanks & Regards
    Rajni

    Avoid entering of primary from form  if possible.
    if not try to customize the new form with infopath and place your custom logic there.
    http://lightningtools.com/uncategorized/modifying-external-list-forms-with-infopath-2010/
    http://salnikan.wordpress.com/2011/07/26/prevention-of-duplicate-entries-based-on-two-or-more-columns-in-a-sharepoint-list/
    Bala

  • Unhandled SOAP Exception When Reading from an External List created from SQL Server

    This is absolutely doing my head it.  Doesn't matter what I do, which approach I take or how its done, I gt the same crappy error from Sharepoint Designer 2010.
    Pulling Data from SQL Server 2008 using An external List.  All I want to do is read the data and display in on the Sharepoint Site..  Nothing fancy, just read.
    Created a Limit filter to limit 100 records per time, removed any primary keys, get no warnings or Errors upon creating the External List or View.  
    But when I add it to the view or data source in page designer, I get the unhandled exception error we all know and love :-(...  
    Anybody shed any light on this before I make a dell 2900 Server sized hole in my window?
    Sharepoint Foundation 2010
    Sharepoint Designer 2010
    SQL Server 2008
    Ta

    Hi,
    If want to change the WCF client (BCS in this case) timeout, you need to change the registry on the SharePoint server.
    The keys are located under:
    HKEY_CURRENT_USER\Software\Policies\Microsoft\office\15.0\Common\Business Data.
    Moreinformation:
    http://blogs.technet.com/b/meamcs/archive/2010/12/23/configuring-wcf-connection-timeout-for-bcs.aspx
    Best Regards
    Dennis Guo
    TechNet Community Support

  • Setting the data source of an External List to a WCF Web Service

    From SharePoint Online, I want to create/connect an External List to a SQL Azure data source.  This will feed a Visio diagram so I want it to be able to refresh and dynamically retrieve
    current data via Visio Services.<o:p></o:p>
    I have a published WCF Web Service in place (Azure Website) connected to this database that consolidates data from multiple tables and returns a variety of generic lists.  From
    my readings, this should bypass the need for much of the security (e.g. secure store, etc...).
    Can I do this?  I'm not seeing an option to Create an ECT as in past versions to connect to this endpoint.  Do I have to create something in Visual Studio to Import?  Any direction
    would be much appreciated.<o:p></o:p>
    Ed

    Find and increase these variables in IIS: maxRequestEntityAllowed and uploadReadAheadSize
    I had a similar issue a while back due to these settings.  They control data to and from ISAPI connections (of which CF is one) according to this article:
    http://www.iis.net/configreference/system.webserver/serverruntime
    Sorry, I cant recall off hand where exactly those settings are in IIS but a quick Google search should turn it up for you.

  • How do I get to display content from an Azure DB , in a SharePoint external list?

    I have an SQL Azure DB, and I am trying to display contents in an external list in SharePoint Online. I have created the external list from the Azure table with BCS and Secure Store as described in the post below...
    http://office.microsoft.com/en-us/office365-sharepoint-online-enterprise-help/make-an-external-list-from-a-sql-azure-table-with-business-connectivity-services-and-secure-store-HA102933008.aspx
    I am now able to view the column headers for the table, however I don't see any data being displayed. There is a bunch of data in the table, but I can't see anything in SharePoint aside from the column headers.

    Hi Spawn,
    Have you successfully retrieved the database table data in SharePoint Designer 2013?
    There may be some incorrect configurations, I would recommend you create a simple DB table and go through the steps again per your referenced link and below article, see if there is any misconfiguration causing this.
    http://jamesdiblasi.wordpress.com/2014/01/19/sharepoint-online-external-azure-database-as-a-list/
    And also we have a dedicated forum below for Office365 SharePoint Online, you can post there for a better assistance with more experts regarding SharePoint Online issue.
    http://community.office365.com/en-us/f/154.aspx
    Thanks
    Daniel Yang
    TechNet Community Support

  • WCF based External List Columns Type in Sharepoint 2010

    In my Sharepoint 2010 I've created External List that uses WCF service as data source. This is my data type that is exposed by the service:
    [DataContract]
    public class Item
    [DataMember]
    public Guid Id { get; set; }
    [DataMember]
    public string Name { get; set; }
    [DataMember]
    public string Description { get; set; }
    Everything is fine as long as I'm using simple types such as string, int, bool. This types are mapped to Sharepoint types without any issue.
    Now I what to use something more complex.
    [DataContract]
    public class Item
    [DataMember]
    public Guid Id { get; set; }
    [DataMember]
    public string Name { get; set; }
    [DataMember]
    public string Description { get; set; }
    [DataMember]
    public Uri Link { get; set; }
    I've added Link property of type Uri. By default this field does not appear in my list at all because, as far as I understand, sharepoint doesn't know how to map this property. I would like to map it to field of type Hyperlink or Picture.
    Is there any way to explicitly define to which type I want my property to be mapped to? I can use another type in my Item class if necessary.

    a URI and a SPHyperLink wouldn't directly match up... a SPHyperLink contains a URI and a description.
    BCS has a bit of trouble when it comes to complex types... your best bet is to stick with the supported primitives, and then convert to a hyperlink on the rendering side (custom list view, search results web part, etc).
    see: http://stackoverflow.com/questions/5399340/sharepoint-bcs-creating-a-hyperlink-column
    Scott Brickey
    MCTS, MCPD, MCITP
    www.sbrickey.com
    Strategic Data Systems - for all your SharePoint needs

  • External List: List View Web Part query never returns

    I am experiencing an usual issue in our development SharePoint 2013 environment. I have been troubleshooting it for a couple hours, so thought it is time to post a message here.
    I have created a number of external content types and lists on our site. I have validated that the lists display the expected data.
    However, when I add a page to our site, and add a list view web part to the page, and point the list view web part at the external list, I get unexpected behavior.  While I am editing the page, the web part displays the expected data. However, after
    I publish the page, when you browse to the page, all you get is the rotating green arrow gif image, and no data. It displays the image forever. If you then attempt to edit the page, in the editor, you can then see the expected data.
    Any thoughts on what might be causing this issue? I have tried switching out web parts, both to the Business Data List and the Content Query web part. The Content Query web part throws an exception if you attempt to point it at any of the external lists,
    which after some reading I discovered that this is a known issue with that web part.
    The Business Data list web part shows the expected data, but I have been unable to get paging/grouping working with that web part yet.
    Greg Pierson

    I have recreated this issue on a clean site collection. I have also discovered this issue only occurs with publishing pages, not site pages. next step is to try to reproduce it on another share point 2013 install.
    Greg Pierson

  • SharePoint InfoPath error SSL/TLS extern list

    Hello !
    I want to modify my Element display on my extern List (BDC SQL Server) with infopath but in SharePoint Designer when I click on edit the form with InfoPath I have this error message :
    "Could not establish trust relationship for the SSL/TLS (secure channel)."
    With the others SharePoint Lists I haven't this problem, I can modify and publish Infopath form...
    Thanks for your help.
    Nols.

    Hi Nols,
    The error might be caused by SharePoint does not trust root certificates when you are trying to access external list over SSL\TLS.
    Here is the link for the similar issue:
    http://www.c-sharpcorner.com/uploadfile/anavijai/could-not-establish-trust-relationship-for-the-ssltls-secure-channel/
    If it does not work, please check in ULS log and find detail error message for further troubleshooting.
    Regards,
    Rebecca Tu
    TechNet Community Support

  • How to read the content from a External Content Type with out creating External List in Sharepoint 2013?

    Hi,
    I have a requirement to read the External Content Type and storing the Data in a Session Variable. The Reading of the content from External Content Type with out creating a External List.
    Please help I am trying to find the solution, but unable to do that.
    Thanks,
    Pradeep

    Hi,
    Firstly an external content type designed to work with SharePoint list and there is no way to read apart from this.
    If you are looking the solution out of the " Business Connectivity" then find that data source has been exposed through WCF and  Web Service ?
    So you can use REST API and CSOM to consume those data in SharePoint.
    You can also leverage the ADO.NET option if the datasources based on MS technologies.
    Murugesa Pandian| MCPD | MCTS |SharePoint 2010

  • How to create a hyperlink column in External List (BCS) ?

    We have an external list set up that gets data from an external content type through a web service (done through BCS). Everything works fine except the fact that one of the fields is supposed to show up as a hyperlink but it shows up as text. Any idea how
    to modify this?
    Example: The webservice object has 2 properties like this:
    Public Class MyObject
    Public string MyTitle{ get; set;}
    Public string MyLink{ get; set;}
    MyLink = "http://www.somewebsite.com"
    The external list shows up with 2 coulmns MyTitle, MyLink. But MyLink is not clickable as a hyperlink. If you look at the list settings, the MyLink column is a text field.
    Some of the answers I got suggested that system.uri is not supported in external list. What I ended up doing for now was to create a regular list (which supports hyperlinks) and dump data to it directly from the webservice ditching BCS.  But we
    will be using BCS quite a bit and if some can give me a definitive answer on hyperlink support in external list, I would appreciate it. Is that a bug?

    Hi,
    I think you have to look into http://msdn.microsoft.com/en-us/library/ff407509.aspx and SPCustomFieldType. You might do this:
    <TypeDescriptor Name="MyLink" TypeName="System.String">
    <Properties>
    <Property Name="SPCustomFieldType" Type="System.String">Url</Property>
    </Properties>
    </TypeDescriptor>
    But I haven't been able to test it out.

  • Read External List Field on Custom ECB action

    I tryed to show a Custom ECB action on an External List.
    The External List have a Field "LOGICAL_ID" with an IP address, but the GetAttributeFromItemTable works only with Standard List.
    How i read the External List Field and open some shell or browser actions with these field?
    <script language="Javascript" unselectable="on">
    // START: Override Function
    function Custom_AddListMenuItems(m,ctx)
    var strDisplayText = "Ping";
    var strDisplayText1 = "Browse Http";
    var strDisplayText2 = "Telnet";
    var strDisplayText3 = "SSH";
    var strDisplayText4 = "Remote Desktop";
    // for test strDisplayText = currentItemID;
    var LOGICAL_ID = currentItemID;
    // var LOGICAL_ID = GetAttributeFromItemTable(itemTable, "LOGICAL_ID");
    // var LOGICAL_ID = itemTable.getAttribute("LOGICAL_ID");
    var strAction = "javascript:var x = new ActiveXObject('WScript.Shell');x.run('ping -t" + LOGICAL_ID + "');window.refresh";
    var strAction1 = "http://" + LOGICAL_ID;
    var strAction2 = "telnet://" + LOGICAL_ID;
    var strAction3 = "telnet://" + LOGICAL_ID + "/? -ssh";
    var strAction4  = "javascript:var x = new ActiveXObject('WScript.Shell');x.run('mstsc /v " + LOGICAL_ID + " /admin');window.refresh";
    var strImagePath = "";
    // Add menu item
    CAMOpt(m, strDisplayText, strAction, strImagePath);
    // add a separator to the menu
    CAMSep(m);
    CAMOpt(m, strDisplayText1, strAction1, strImagePath);
    CAMOpt(m, strDisplayText2, strAction2, strImagePath);
    CAMOpt(m, strDisplayText3, strAction3, strImagePath);
    CAMOpt(m, strDisplayText4, strAction4, strImagePath);
    // false means that the standard menu items should also be rendered
    return true;
    // END: Override function
    </script>

    Hi,
    If you want to disable the Rich Text Field dynamically, you can consider to use JavaScript and JavaScript Client Object Model.
    The “disable” attribute seems not work on Rich Text Editor control, so we can set the “display” attribute as “none” to hide the control instead:
    <script type="text/javascript">
    document.getElementById("ctl00_PlaceHolderMain_rftDefaultValue").style.display = "none";
    document.getElementById("ctl00_PlaceHolderMain_rftDefaultValue_toolbar").style.display = "none";
    document.getElementById("ctl00_PlaceHolderMain_rftDefaultValue_iframe").style.display = "none";
    console.log('hide');
    </script>
    You will need to find out the id of the toolbar and textbox of the Rich Text Editor control in page using IE developer(F12) first, then replace the ids in the script above.
    We can get values of list items using JavaScript Client Object Model:
    http://msdn.microsoft.com/en-us/library/office/hh185006(v=office.14).aspx
    More information about JavaScript Client Object Model:
    http://msdn.microsoft.com/en-us/library/office/hh185011(v=office.14).aspx
    http://msdn.microsoft.com/en-us/library/office/hh185015(v=office.14).aspx
    Feel free to reply if there are still any questions.
    Thanks
    Patrick Liang
    Forum Support
    Please remember to mark the replies as answers if they
    help and unmark them if they provide no help. If you have feedback for TechNet
    Subscriber Support, contact [email protected]
    Patrick Liang
    TechNet Community Support

  • Displaying a Master Detail Relationship in a Panel Accordion or Tabs

    Hi,
    Is it possible to display a Master-Detail relationship in a Panel Accordion or Panel Tab or other component that visually divides the display?
    Say I have a Department - > Employees master detail relationship and I want each tab in my accordion to represent each
    departments and when I clicked the tab, the list of employees associated with that department is displayed.
    I am exploring this idea but I cant get to find a resource on how to move forward. I am using JDev 11.1.1.4. Thanks

    Hello,
    I recently faced the same problem and did not find a clean solution either. So I implemented it a bit more "dirty". :-)
    Instead of using the Department > Employee view link, I just created a new view object (say EmployeesFromDept), that has a bind parameter called p_DeptId:
         SELECT ...
         FROM   EMPLOYEES e
         WHERE  e.DEPARTMENT_ID = :p_DeptIdThe Data Control of this VO will have an ExecuteWithParams operation that takes the department id as input. Create an action binding in your page definition that binds to this operation, called "RefreshEmployeesForDept":
         <action IterBinding="EmployeesFromDeptIterator" id="RefreshEmployeesForDept"
                InstanceName="MyAMDataControl.EmployeesFromDept"
                DataControl="MyAMDataControl" RequiresUpdateModel="true"
                Action="executeWithParams">
          <NamedData NDName="p_DeptId" NDValue="" NDType="java.lang.String"/>
        </action>In your page, add the current DepartmentId to each showDetailItem using an attribute and add a disclosureListener:
         <af:iterator id="i1" value="#{bindings.Departments.collectionModel}" var="row">
                <af:showDetailItem text="#{row.DepartmentName}" disclosureListener="#{pageFlowScope.myBean.toggleDisclosed}">
                   <f:attribute name="currentDepartmentId" value="#{row.DepartmentId}"/>
                              <af:table value="#{bindings.EmployeesFromDept.collectionModel}" var="row"
                          rows="#{bindings.EmployeesFromDept.rangeSize}"
                          emptyText="#{bindings.EmployeesFromDept.viewable ? 'No data to display.' : 'Access Denied.'}"
                          fetchSize="#{bindings.EmployeesFromDept.rangeSize}"
                          rowBandingInterval="0" id="t1">
                   //Lots of mapping column here
                        </af:table>
                </af:showDetailItem>
         </af:iterator>Now each showDetailItem that is generated knows the DepartmentId it "belongs to". In the toggleDisclosed(DisclosureEvent disclosureEvent) method, first fetch this attribute, so that you know the dept id of the showDetailItem that was clicked. Next, programmatically call the RefreshEmployeesForDept action binding if the current event is "disclosing the showDetailItem":
         public void toggleDisclosed(DisclosureEvent disclosureEvent) {
              String currentDepartmentId = disclosureEvent.getComponent().getAttributes().get("currentDepartmentId").toString();
              if(disclosureEvent.isExpanded()){
                   DCBindingContainer bindings = (DCBindingContainer)BindingContext.getCurrent().getCurrentBindingsEntry();
                   OperationBinding operBinding = bindings.getOperationBinding("RefreshEmployeesForDept");
                   if(operBinding != null){
                        operBinding.getParamsMap().put("p_DeptId", currentDepartmentId);
                        operBinding.execute();
        }Now, each time a showDetailItem is opened, the bind variable of the iterator belonging to your list of Employees will be refreshed with the correct DepartmentId. Ie the department that the showDetailItem represents.
    Hope this helps! If you find a cleaner solution, please let me know. :-)
    Regards,
    Chris

  • Login failed for user 'NT AUTHORITY\ANONYMOUS LOGON'. when open external list

    Hi
    i created a external list based on a external content type in shaepoint designer
    but i got this error in event viewer when i open this list
    Could not open connection using 'data source=xxxx;initial catalog=xxx;integrated security=SSPI;pooling=True;persist security info=false' in App Domain '/LM/W3SVC/1756231635/ROOT-1-130330475307091531'. The full exception text is: Login failed for user 'NT
    AUTHORITY\ANONYMOUS LOGON'.
    I created bcs service with Users Identity  and my web application using claims based authentication
    and sql server in  seperate server under a domain.
    all servers are in same domain
    adil

    Most likely you are running into double-hope issue. 
    Read following article and implement the workaround that works for you.
    http://www.spdoctor.net/Pages/message.aspx?name=login-failed-for-user-bdc
    I am assuming your are using NTLM in your farm. If you are using Kerberos then check the following article.
    http://blogs.technet.com/b/harmeetw/archive/2011/08/28/getting-login-failed-for-user-nt-authority-anonymous-logon-when-browsing-external-list-on-a-claims-kerberos-web-application.aspx
    Amit

  • How to Display a Calender upon clicking the dropdown list inside a table co

    Hi,
    I have a Listbox inside my table control and I need to Display a Calender upon clicking the dropdown list.
    Can any body help.
    Srinivas

    Hi,
    Try this:
    On your customizing screen,
    PROCESS ON VALUE-REQUEST.          
        Field T_ZT-SDATE
          module create_dateselect.
    In your main program:
    module create_dateselect.
    data:p_date like sy-datum.
    CALL FUNCTION 'F4_DATE'
       EXPORTING
         holiday_calendar_id = 'CN'                   
         display = ' '
       IMPORTING
         select_date = p_date
       EXCEPTIONS
         OTHERS = 4.
    t_zt-sdate = p_date.
    endmodule.
    Regards,
    Pole

Maybe you are looking for