开发复杂自定义Sharepoint表单的最佳实践 [英] Best Practise to develop Complex Custom Sharepoint Form

查看:95
本文介绍了开发复杂自定义Sharepoint表单的最佳实践的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,

我们有一个非常复杂的表单来开发数据属于同一个实体(项目)的地方..

We have a very complex form to develop where the data belong to the same entity (project) ..

表格如下:

只读字段组 

Group of read-only fields 

项目清单 

List of items 

另一个不同商品列表 

Another List of different items 

第三个不同商品列表

 我们正在考虑创建3个自定义列表,其中包含一个ProjectId列,仅加载相关数据和构建表单,以根据当前项目加载每个列表。

 We are thinking to create 3 custom lists having a column ProjectId to load only the related data and build form to load each list according to the current projectid.

我们正在开发自定义使用Visual Studio和CSOM进行表单。 

We are developing the custom form with Visual Studio and CSOM.. 

对这种复杂相关数据进行建模并在sharepoint中开发表单以获得最佳性能并可能缩短开发时间的最佳方法是什么?

What is the best method to model such complex related data and develop the form in sharepoint to have best performance and possibly decrease development time?

推荐答案

您好

如果你只是想找到一些建议,SharePoint caml join应该对你的情况有所帮助。

你可以使用caml join加入thress列表和查询特定数据。

您可以查看下面我测试的示例caml查询(它可以用于CSOM(C#) ))。

以下是供您参考的帖子。

var CAMLJoins =
               "<Joins>" +
               "<Join Type='INNER' ListAlias='ListeEtage'>" +
               "<Eq>" +
               "<FieldRef Name='IDListeEtage' RefType='Id'/>" +
               "<FieldRef List='ListeEtage' Name='ID'/>" +
               "</Eq>" +
               "</Join>" +
               "<Join Type='INNER' ListAlias='ListeBatiment'>" +
               "<Eq>" +
               "<FieldRef List='ListeEtage' Name='IDListeBatiment' RefType='Id'/>" +
               "<FieldRef List='ListeBatiment' Name='ID'/>" +
               "</Eq>" +
               "</Join>" +               
               "</Joins>";

        var CAMLProjFlds =
            "<ProjectedFields>" +
            "<Field Name='Batiment' Type='Lookup' List='ListeBatiment' ShowField='CodeBatiment'/>" +
            "<Field Name='Etage' Type='Lookup' List='ListeEtage' ShowField='CodeEtage'/>" +            
            "</ProjectedFields>";

        var ViewXml = "<View><Query></Query><ViewFields><FieldRef Name='Batiment'/><FieldRef Name='Etage'/><FieldRef Name='CodeLocal'/></ViewFields>" + CAMLProjFlds + CAMLJoins + "<RowLimit>100</RowLimit></View>";

        

https://stackoverflow.com/questions/50229652/how-to-retrieve-items-from-lists-in-caml-query-sharepoint/50250562 #50250562

最好的问候,

Lee


这篇关于开发复杂自定义Sharepoint表单的最佳实践的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆