/// "<Method ID='1' AddToView=''><Field Type='Lookup'
/// List='[GUID of a foreign list]' DisplayName='Field1'
/// Required='TRUE' /></Method>" +
/// "<Method ID='2' AddToView=''><Field Type='Number'
/// DisplayName='Field2' Required='FALSE' /></Method>"
/// </param>
/// <param name="strNewGuid">The GUID of the new list.</param>
/// <param name="nodeUpdateResult">The results of the update statement.</param>
/// <seealso href="http://msdn2.microsoft.com/en-us/library/ms437580.aspx">
/// Field Element</seealso>
public static void CreateList(
Lists listService,
string strListName,
string strDescription,
string strFieldsInnerXml,
out string strNewGuid,
out XmlNode nodeUpdateResult
) {
CreateList(
listService,
strListName,
strDescription,
strFieldsInnerXml,
null,
100,
out strNewGuid,
out nodeUpdateResult
);
}
/// <summary>
/// When SharePoint fields reference foreign lists their values typically
/// consist of a combination of the Id and Title of the foreign record
/// (e.g. 1#;SomeTitle). This method parses both the Id and the Title.
/// </summary>
/// <param name="strReference">The reference to a foreign record.</param>
/// <param name="intId">The foreign record's unique id.</param>
/// <param name="strTitle">
/// The foreign record's title or other identifying (but not
/// necessarily unique) field.
/// </param>
/// <returns>True if parsing was successful, otherwise false.</returns>
public static bool ParseSharePointReference(
string strReference,
out int intId,
out string strTitle) {
// provide default values for the out parameters if this method fails
intId = -1;
strTitle = null;
36
Putting SharePoint to Work for You, an Internet.com Developer eBook. Copyright 2008, Jupitermedia Corp.
Putting SharePoint to Work for You
[
]