Malcan Workflow for SharePoint (MWS) - API useful for scripting - all in browser with automatic syntax check (do not hesitate to ask for more)

EditCommentFilter
Expand/Collapse Class : _Global ‎(39)
 Command# Any comment till end of line
For commenting code. You need to use # for every line of your comment. Rest of line is treated as comment only.
 CommandDIM variableName AS anyClass
Declares a new variable scoped for the time of script
 CommandIF condition THEN true commands [ELSE false commands] END IF
Control block so depending on the condition (of Boolean type) it executes either TRUE commands block or FALSE commands block (if ELSE exists). IF commands can be nested.
 CommandINPUT variableName AS FIELD(listName as String, fieldName as String)
Forces Manual Tasks to accept new inputs from users based on the types declared per list/column). Those inputs are then available for you to manage in script. It is very useful for custom editing forms when you want your users to enter some data before running an action.
 
The listName argument is optional, empty string "" means we want field from the same list we are managing. ListName must be the list's display name, fieldName is the field's internal name.
 
Example for taking one comment and saving it later within the same list:
INPUT newComment as Field("", "OurColumnInTheSameList")
SET value("OurColumnInTheSameList") = newComment
 
Example for taking few inputs from different lists:
INPUT someString as Field("", "ColumnString")
INPUT someChoice as Field("AnotherList", "ColumnChoice")
INPUT somePerson as Field("ThirdList", "ColumnPerson")
 
Few important notes are:
- You can use them only with actions of "Manual Task" type as we cannot input anything for other tasks.
- You need to use it at the beginning of the script only (there can be many inputs one after another, all from the same web site).
- This is very universal mechanism as you can ask for any Sharepoint field's type e.g. persons, groups, choices, lookups etc. UI rendering will be used the same as Sharepoint does and it always takes the column's definitions e.g. if field is required with given description - all that information is handled properly.
- All users that are asked with such Manual Task, must have at least ADD NEW ITEM permissions on those lists. Otherwise rendering control will not work properly. Please test it with simple user, and not with administrator.
 CommandSET object or variable = expression
AssigmentSee in action
 FunctionADCreate(SamAccountName as String, Type as String)
Function that creates Active Directory® object with given SamAccountName. With Type atribute you define what kind of object will be created. Currently supported Type is "User" only (shortly comming Security Groups and Distribution Lists). Function does not return any value.
 
Note: in order to use any of the AD* functions you need to define MWS parameter called LDAP_PATH as StringSingleLine and put there a value e.g. LDAP://OU=UsersManagedByMWS,DC=Malcan,DC=com (which OU you are to manage). Also it is suggested to run dedicated Web Application with separated Application Pool and New Site Collection to manage AD objects. Why? Because you need dedicated permission to be given only to that Application Pool's service account and only to that OU in your AD. You may also want to minimize permissions in that OU so only certain properties can be changed e.g. you want to change only first name, second name and department and nothing more.
Ask Malcan
 FunctionADExists(SamAccountName as String)Boolean
Function returns True if object with given SamAccountName exists.
Be aware of note described at ADCreate function.
 FunctionADGet(SamAccountName as String, PropertyName as String)String
Returns always String represantation of the Active Directory® object value. The attributes are: SamAccountName (which object), PropertyName (which property). Typical examples of AD properties are: samaccountname, givenName, description, displayName, SN, name, mail.
Be aware of note described at ADCreate function
 
Example:
set value("MyGivenNameColumn") = ADGet(CurrentUser().GetLogin(False), "givenName")
 FunctionADSet(SamAccountName as String, PropertyName as String, Value as String)Boolean
Function sets one property of the Active Directory® object. The attributes are: SamAccountName (which object), PropertyName (which property), Value (what we are to set - always String represantation is needed). As an addition to typical AD properties are you may also use special two property names: UserEnabled (to control if object is enabled/disabled and "True", "False" as value), Password (to set newer password). Returning True when succeeded.
Be aware of note described at ADCreate function.
Ask Malcan
 FunctionCallDLL(s1 as String, s2 as String, s3 as String, s4 as String, AssemblyName as String, ClassName as String)String
If MWS API is not sufficient for you may ask us to improve the set of actions/operations or just use your custom DLL library. You may dynamically call any custom DLL library directly from within MWS. Check guidelines please.
 FunctionCurrentList()List
Global function returning current List objectSee in action
 FunctionCurrentListRow()ListRow
Global function returning current ListRow object
 FunctionCurrentUser()User
Global function returning current user object - useful with synchronous events (adding, updating, deleting) and manual tasks actions. When you use timer jobs or asynchronous events (post added, post updated, post deleted) it will return the IIS application pool context - consider using value("Author") or value("Editor") in those scenarios.
 FunctionCurrentWeb()Web
Global function returning current Web object
 FunctionForEachRow(InList as List, CamlQuery as String, Variable as ListRow) ... Next
Loop with all the list rows that satisfy the CAML condition. Each iteration runs all the commands between ForEachRow and Next. Nesting ForEachRow is forbidden. The third argument must be of type ListRow and it must be the declared variable. For CAML syntax refer also to List.GetRowByQuery method.
 
The example to concatenate all the Titles that are greater or equal to "c" is:
dim myRow as ListRow
dim result as String
forEachRow(
   currentList(),
   "<Geq>
      <FieldRef Name='Title'/><Value Type='Text'>cc</Value>
   </Geq>"
   , myRow)
      set result = result + myRow.value("Title") + " "
next
# here we have result
 FunctionIsNull(expression)Boolean
Evaluates expression and depending if it has value returns TRUE, otherwise FALSE
 FunctionIsNullTo(expression, valueIfNull)Expression type OR valueIfNull type
Similar to IsNull, but in case expression evaluates to Null returns valueIfNull. If expression has own value returns the same expression.
 FunctionNewGuid()Guid
Global function returning always new unique Guid (globally unique identificator, 128 bits)
 FunctionNow()DateTime
Global function returning the current date and time
 FunctionParam(uniqueName as String)depends on the type of the parameter
Global function returning one of the defined parameters for that list. You need to define them first.See in action
 FunctionParamProc(uniqueName as String)depends on code
Global function "kind of procedure" that is very usefull when you repeat some script many times e.g. sending similar mails with plenty lines of body. Using ParamProc you may write code once, put in as one of the String parameters and run it multiple times from many scripting places. ParamProc works really as preprocessor replacement tool e.g. you may declare variables in code, and use them in ParamProc or vice versa.
 FunctionSendMail(to as String, cc as String, bcc as String, subject as String, body as String, priority as Int, isHtml as Boolean)String("OK" if successfully sent, otherwise error message)
Sending mails using SMTP server registered in the current web site. You must pass correct mail address for To required argument, CC and BCC - those aguments can be either comma seperated strings or empty strings "".
HINT: for big messages e.g. with HTML formatting you will probably want to use ParamProc function, and have your body details kept in Parameters (cleaner and smaller code).
If does not work, ensure standard Sharepoint outgoing mails are sent properly like alerts (also check if SMTP serwer and From Address was set in SharePoint Administration). If you still cannot send, check two things: common problem and also try CMD => telnet YourSMTPServerName 25 => should be connected (otherwise check network connections, antivirus etc.).
 
Example is: sendMail(currentUser().Email,"","", "mySubject", "myHtmlBody", 0, true). Priority=0 means Normal, 1-Low, 2-High.See in action
 
NOTE: starting with v.4.0 it returns String, not Boolean. "OK" means sent properly, otherwise returns detailed error message.
 FunctionStopEvent(errorMessage as String)
Available only in synchronous events like Adding, Updating, Deleting. With this function you can throw error and don't allow to save user changes.
 FunctionValue(internalName as String)depends on the type of the column
Global function returning CURRENT values for currentListRow. Equivalent to currentListRow().Value(...). When you make mistake with the name "syntax check" will help you suggesting proper internal name.See in action
 FunctionValueOld(internalName as String)depends on the type of the column
Global function returning OLD values for currentListRow. Equivalent to currentListRow().ValueOld(...). Available only in Updating event (here we have old and new values and we can compare changes)
 Operator-Int, Double
Minus (between INT and DOUBLE types)
 Operator*Int, Double
Multiplication (between INT and DOUBLE types)
 Operator/Double
Division (between INT and DOUBLE types, returning always DOUBLE)
 Operator^Int, Double
Power (between INT and DOUBLE types)
 Operator+Int, Double, String
Sum between INT and DOUBLE types
Concatenation for STRING - when second argument is not of String type it automatically converts to safe String e.g. you can do "MyListUrl is: " & SomeList instead of "MyListUrl is: " & SomeList.Link.Url. Safe to call even if SomeList is null.
Combines two sets for USER objects (multivalues)
 Operator<Boolean
Less than (between INT, DOUBLE, STRING, DATETIME types)
 Operator<=Boolean
Less or equal (between INT, DOUBLE, STRING, DATETIME types)
 Operator<>Boolean
Is not equal (between INT, DOUBLE, STRING, DATETIME types, also available for USER, GUID).
Safe to call even if objects are null e.g Object<>Null returns TRUE, Null<>Null returns FALSE
 Operator==Boolean
Is equal (between INT, DOUBLE, STRING, DATETIME types, also available for USER, GUID).
Safe to call even if objects are null e.g Object==Null returns FALSE, Null==Null returns TRUE
 Operator>Boolean
Greater (between INT, DOUBLE, STRING, DATETIME types)
 Operator>=Boolean
Greater or equal (between INT, DOUBLE, STRING, DATETIME types)
 OperatorANDBoolean
Logical AND (between BOOLEAN types)
 OperatorNOTBoolean
Logical NOT (before BOOLEAN type)
 OperatorORBoolean
Logical OR (between BOOLEAN types)
Expand/Collapse Class : Boolean ‎(2)
 MethodToString()String
"True" or "False". Safe to call even if object is null.
 ValueDim x As Boolean
TRUE or FALSE
Expand/Collapse Class : DateTime ‎(7)
 Attribute (ReadOnly)DateOnlyString
Gets the string representation of date in the format YYYY-MM-DD (useful e.g. for CAML queries).
5.1
 MethodAdd(Amount as Int, Unit as String)DateTime
Adds multiple intervals to current date and returns resulting DateTime e.g. set oneDayAfter=now().Add(1,"Day")
Units are based on const string: "Year", "Month", "Day", "Hour", "Minute", "Second".
 MethodDatePart(Part as String)Int
Returns number representing part of the datetime e.g. just year or just minutes. Use one of part strings: "Year", "Month", "Day", "Hour", "Minute", "Second".See in action
 MethodDiff(SecondArgument as DateTime, Unit as String)Int
Returns difference in times: object DateTime MINUS second argument DateTime. Difference is expressed in full units based on Unit string: "Year", "Month", "Day", "Hour", "Minute", "Second".See in action
 MethodToString()String
Returns using default format "yyyy-MM-dd HH:mm:ss". Safe to call even if object is null.
If you want another formatting you need to use DatePart method with string concatenations (+).
 MethodWeekDay()Int
Returns 1 for Sunday, 2 for Monday... and 7 for SaturdaySee in action
 ValueDim x As DateTime
Date and Time
Expand/Collapse Class : Double ‎(6)
 MethodToInt()Int
Parsing, can result in error
 MethodToIntRoundDown()Int
Conversion to lower integer
 MethodToIntRoundNearest()Int
Conversion to nearest Int
 MethodToIntRoundUp()Int
Conversion to upper integer
 MethodToString()String
Converts Double to String. Safe to call even if object is null.
 ValueDim x As Double
Number with precision of DOUBLE. Comma separated e.g. 23,45. Also SharePoint currencies are represented as Double.
Expand/Collapse Class : Guid ‎(2)
 MethodToString()String
Default format e.g. "9cac9a87-559b-4393-93b5-3045c16bace5". Safe to call even if object is null.
 ValueDim x As Guid
Globally Unique Identificator (128 bit)
Expand/Collapse Class : Int ‎(3)
 MethodToDouble()Double
 MethodToString()String
Converts Int to String. Safe to call even if object is null.
 ValueDim x As Int
Integer number (based on Int32)
Expand/Collapse Class : Link ‎(5)
 Attribute (ReadOnly)ForHtmlString
Returns html form of the link <a href="Url">Name</a> usefull when sending links in HTML format when you want to show workign URL as Title e.g. Malcan Site
 Attribute (ReadWrite)NameString
Display name of the link.
 Attribute (ReadWrite)UrlString
URL of the link e.g. http://...
 MethodToString()String
Converts Link to String and returns URL part only. Safe to call even if object is null.
 ValueDim x as LinkString
Represents pair name and url. Suitable for SharePoint fields of type hypelink. To assign a new Link check helpful String.ToLink() conversion method.
Expand/Collapse Class : List ‎(18)
 Attribute (ReadOnly)GuidGuid
Returns unique identificator of the list
 Attribute (ReadOnly)LinkLink
Returns link of the list
 Attribute (ReadOnly)ParentWebWeb
 Attribute (ReadWrite)TitleString
 MethodAddRow(CommaSeparatedFields as String, Value1, Value2, ...)Int
Adds new row to the list and returns ID of this new row:
- CommaSeparatedFields are the internal field names.
- Value1, Value2, ... are the values to be assigned to the new row for given CommaSeparatedFields. You need to specify exactly the same number of fields and values.
 
Example with three fields and three values: currentList().AddRow("Title, MyDateField, MyUserField", "new title", now(), CurrentUser())
 MethodGetColumn(ColumnName as String)ListColumn
 MethodGetRowByID(RowId as Int)ListRow
Returns row with values from the list - if found.
 MethodGetRowByQuery(Query as String)ListRow
Returns first row matching query - if found. Query is any CAML <WHERE> format, but without beginning and ending <WHERE> e.g.
to get first row with given Status field use SET resultRow=myList.GetRowByQuery("
<Eq>
   <FieldRef Name='Status'/><Value Type='Text'>Completed</Value>
</Eq>")
 
Some usefull CAML tags are: Eq, Neq, Lt, Gt, Leq, Geq.
 
Note: CAML does not allow you to nest more than 2 arguments for <AND> <OR> so in case you need to use more arguments you need to nest <AND> <OR> e.g. BAD EXAMPLE <AND> one two three </AND> GOOD EXAMPLE <AND> one <AND> two three </AND></AND>
 MethodGetRowRandom()ListRow
Returns random ListRow from this list. Each time you run it you may get different result.
 MethodGetRowsAmountByQuery(Query as String)Int
Returns amount of rows matching query. Query is any CAML <WHERE> format, but without beginning and ending <WHERE> e.g. to get number of rows in a given dates range (greater or equal to ... AND less than or equal to ...) use set rowsNo = someList.GetRowsAmountByQuery("
<And>
  <Geq>
     <FieldRef Name='Day'/><Value Type='DateTime'>"+someDateStart.ToString()+"</Value></Geq>
  <Leq>
     <FieldRef Name='Day'/><Value Type='DateTime'>"+SomeDateEnd".ToString()+"</Value></Leq>
</And>")
 
 MethodGetRowsAmountByValue(ColumnName as String, Value as String)Int
Returning number of rows that match criteria of particular column equal to given value. This method is equivalent to GetRowsAmountByQuery(Query as String), but you don't need to use CAML "<Eq><FieldRef Name='MyColumnName'/><Value Type='Text'>MyValue</Value></Eq> and just write GetRowsAmountByValue(MyColumn, MyValue).
With this method you may easily check for uniqueness of values in the whole list e.g. when Adding new row you can easily check if some attribute is unique across all the list rows items comparing result to zero.
 MethodGetRowsSumByQuery(ColumnName as String, Query as String)Double
Returns sum of values in the given field ColumnName. Query is CAML query (check similarity to GetRowsAmountByQuery method). Please ensure that ColumnName values can be parsed to Double (Numeric fields), otherwise method will try to convert to Double and make sum for those values that succeed.
 MethodHasUserPermission(u as User, PermissionLevelName as String)Boolean
Returns True when given user has given permission on this list e.g. CurrentList().HasUserPermission( CurrentUser(), "Read") will result with True when this user has Read permission (or any of the SharePoint groups this user belongs to).
In case given user is multivalue the function checks only the first user.
 MethodSetPermissionAdd(PermissionLevelName as String, Users as User)
Adding new permissions for List (also document library). Check description for similar ListRow.SetPermissionAdd().
 MethodSetPermissionClear()
Clears all the permissions for List (or document library) - usually used when you to start adding new permissions from scratch. Check description for similar ListRow.SetPermissionClear()
 MethodSetPermissionInherit()
Sets List (or document library) permissions to be inherited from parent. Check description for similar ListRow.SetPermissionInherit().
 MethodToString()String
Converts List to String and returns URL part of Link attribute only. Safe to call even if object is null.
 ValueDim x As List
SharePoint List or Document Library (based on SpList)
Expand/Collapse Class : ListColumn ‎(8)
 Attribute (ReadOnly)InternalNameString
 Attribute (ReadOnly)ParentListList
 Attribute (ReadWrite)ShowInDisplayFormBoolean
You can dynamically control which columns should be available for displaying details in a form. Applies to all the rows in the list.
OBSOLETE: starting with v.4.0 REPLACED with special "Managing MWS" form.
 Attribute (ReadWrite)ShowInEditFormBoolean
You can dynamically control which columns should be available for editting or not. Applies to all the rows in the list.
OBSOLETE: starting with v.4.0 REPLACED with special "Managing MWS" form.
 Attribute (ReadWrite)ShowInNewFormBoolean
You can dynamically control which columns should be available for new form. Applies to all the rows in the list.
OBSOLETE: starting with v.4.0 REPLACED with special "Managing MWS" form.
 Attribute (ReadWrite)TitleString
 MethodToString()String
Converts List to String and returns field's TITLE only. Safe to call even if object is null.
 ValueDim x As ListColumn
SharePoint one list field of the list - the column (based on SpField)
Expand/Collapse Class : ListRow ‎(12)
 Attribute (ReadOnly)IdInt
 Attribute (ReadOnly)LinkLink
Returns link of the list
 Attribute (ReadOnly)ParentListList
 MethodCopyAttachments(ToListRow as ListRow)Boolean
Copies all the attachments from the object's list row to another list row. Applicable only on lists (not document libraries). Note also that we don't overwrite existing files with the same attachment name (no error occurs).
 
Example copying items from current row to the row id 1 of the list "l2":
dim targetList as List
dim targetRow as ListRow
set targetList = CurrentWeb().GetListByName("l2")
set targetRow = targetList.GetRowByID(1)
CurrentListRow().CopyAttachments(targetRow)
 MethodHasUserPermission(u as User, PermissionLevelName as String)Boolean
Returns True when given user has given permission on this ListRow e.g. CurrentListRow().HasUserPermission( CurrentUser(), "Read") will result with True when this user has Read permission (or any of the SharePoint groups this user belongs to).
 MethodSetPermissionAdd(PermissionLevelName as String, Users as User)
In order to add new permissions for given row you need to know the permission level name that is available for this web site like "Contribute". Second object User is multivalued field so you can easily set permissions for more users at the same time. Usually you will start with SetPermissionClear() and then start adding yours.
Note: at the same time you break permissions inheritance.See in action
 MethodSetPermissionClear()
In order to clear all current permissions and start adding with blank permissions set.
Note: at the same time you break permissions inheritance.See in action
 MethodSetPermissionInherit()
In order to clear custom permissions on the row and use default inherited once.
 MethodToString()String
Converts ListRow to String and returns URL part of Link attribute only. Safe to call even if object is null.
 MethodValue(InternalName as String)depends on the type of the column
Returning CURRENT values for currentListRow. Check also global function Value(...).
 MethodValueOld(InternalName as String)depends on the type of the column
Returning OLD values for currentListRow. Check also global function ValueOld(...).
 ValueDim x As ListRow
SharePoint one item on the list - the row (based on SpListItem)
Expand/Collapse Class : Lookup ‎(5)
 Attribute (ReadOnly)LookupListList
Returns the parent List object e.g. value("myLookupField").LookupList.Title
 Attribute (ReadOnly)LookupListRowListRow
Returns the associated parent row object (of Parent List) e.g. to get value from parent list you may use SET val = value("myLookupField").LookupListRow.value("someFieldFromParentList")See in action
 Attribute (ReadWrite)LookupIdInt
Gets or sets first lookup row for given field. In order to set it properly please construct first Lookup variable based on given list row as follows:
dim LookupVariable as Lookup
set LookupVariable = value("LookupField")
set LookupVariable.LookupID = 5 # new lookup ID that should exist in the lookup list
set value("MyLookupField") = LookupVariable
 MethodToString()String
Converts Lookup to String and returns all comma separated TITLES (for multiple lookup references). Safe to call even if object is null.
 Valuedim x as Lookup
Represents lookup SharePoint field.
Expand/Collapse Class : String ‎(13)
 MethodIndexFromLeft(SearchForString as String)Int
Returns 1-based index of found string (starting searching from left side). Zero otherwise.
 MethodIndexFromRight(SearchForString as String)Int
Returns 1-based index of found string (starting searching from right side). Zero otherwise.
 MethodLeft(numberOfCharacters As Int)String
 MethodMid(StartingIndex As int, NumberOfCharacters As Int)String
Returns part of string starting with StartingIndex (1-based) and with the length of NumberOfCharacters.
 MethodReplace(FindString as String, ReplaceString as String)String
It replaces all occurances of FindString with ReplaceString e.g. dim S as String    set S="abca"   set S=S.Replace("a","X") will result with S value "XbcX"
 MethodRight(numberOfCharacters As Int)String
 MethodToBoolean()Boolean
Parsing, can result in error
 MethodToDateTime()DateTime
Parsing, can result in error
 MethodToDouble()Double
Parsing, can result in error
 MethodToGuid()Guid
Parsing, can result in error
 MethodToInt()Int
Parsing, can result in error
 MethodToLink()Link
It tries to get both url and name from the string format: "http://malcan.com, Malcan" (Sharepoint style - please note comma and space between two). If comma not found both name and url are set same. Example value("myLinkField")="http://x.com"
 ValueDim x As String
E.g. "text in quotes"
Expand/Collapse Class : User ‎(11)
 Attribute (ReadOnly)ADDirectsUser
Returns all direct reports (multivalue) dynamically from Active Directory. If object consist of many users it returns directs of the first manager only.
 Attribute (ReadOnly)ADManagerUser
Returns manager dynamically from Active Directory. If object consist of many users it returns manager of the first user only.
 Attribute (ReadOnly)EmailString
Gets email (of the first user only). Compare also with attribute EmailsAll.
 Attribute (ReadOnly)EmailsAllString
Comma seperated string with all the EMAILS for all users. Usefull when sending mail to everybody. You can easily send messages to any Sharepoint Group in that way. (if object has more than one user)See in action
 Attribute (ReadOnly)IdInt
User identificator in the site collection (of the first user only)
 Attribute (ReadOnly)NameString
User full name (first name and surname). For multivalue you get first user only. In order to get all names use NamesAll attribute.
 Attribute (ReadOnly)NamesAllString
Semicollon seperated string with all the NAMES for all users. (if field has more than one user)
 MethodGetLogin(IsDomainIncluded as Boolean)String
Returns Login of the user (or the first user in the collection). Argument decides if we want full login name with domain or just an alias (SamAccountName usefull with ADGet method).
 
Examples:
CurrentUser().GetLogin(true) => malcan\jsmith
CurrentUser().GetLogin(false) => jsmith
5.4
 MethodIsUserIn(UserToFind as User)Boolean
Checks if UserToFind is available in the multivalue object User.
E.g. we have UserColection (as User) that consists of 5 people and we have UserToFind (as User) that is one person. UserCollection.IsUserIn(UserToFind) returns TRUE if that one person is in the group of five, otherwise FALSE.
 MethodToString()String
Converts User to String and returns all comma separated emails of users (for multivalue - the same as EmailsAll). Safe to call even if object is null.
 ValueDim x as User
Representing user (based on SpUser). Note that it can be multivalue field and it can consist of many users, even groups. However when you read this field, groups are expanded to users e.g. you read a field that consists of two values: user X and group G, let's assume that G in Sharepoint consists of users Y and Z => your User object will then have 3 users X, Y, Z.
Expand/Collapse Class : Web ‎(14)
 Attribute (ReadOnly)LinkLink
Returns link of the list
 Attribute (ReadOnly)UrlAliasString
Gets the Web UrlAlias. If for example you are on site http://server/site1/site11 when you call currentWeb().UrlAlias you will get "site11". Also compare with Title attribute.
 Attribute (ReadWrite)TitleString
 MethodCreateSubweb(UrlAlias as String, Title as String, Description as String, LCID as Int, SiteTemplate as String)Web

Creates completely new subsite with given attributes.
- UrlAlias must be unique across all subsites.
- LCID if ZERO creates subsites with the same language, otherwise it uses the specified one.
- SiteTemplate is the name of your site template saved in the sites gallery or you may use any of the default sites e.g. STS#0 for Team Site, BLOG#0 for Blog site (see reference at http://msdn.microsoft.com/en-us/library/ms473439.aspx)

 MethodGetListByGuid(listGuid as Guid)List
Returns List object by unique list guid.
 MethodGetListByName(listName as String)List
Returns List object by given list display name (or list title).
 MethodGetSubweb(UrlAlias as String)Web
Finds the Web object representing one of the subsites. If for example you are on site http://server/site1 and want to get reference to site http://server/site1/site11 you need call GetSubweb("site11").
For security reasons you can manage subsites and never parent sites.
 MethodGetUserByID(CommaSeparatedUserIDs as String)User
Returns User object (single or multivalue) based on comma separated user IDs e.g. CurrentWeb().GetUserByID("5,6,7") will result in User object consisting of three SharePoint users (if found such ID's in given site collection).
 MethodHasUserPermission(u as User, PermissionLevelName as String)Boolean
Returns True when given user has given permission on this web site e.g. CurrentWeb().HasUserPermission( CurrentUser(), "Read") will result with True when this user has Read permission (or any of the SharePoint groups this user belongs to).
 MethodSetPermissionAdd(PermissionLevelName as String, Users as User)
Adding new permissions for WebSite. Check description for similar ListRow.SetPermissionAdd().
For security reasons you are not allowed to change permissions on current and parent web sites - applies only to subsites.
 MethodSetPermissionClear()
Clears all the permissions for this WebSite - usually to start adding new permissions from scratch. Check description for similar ListRow.SetPermissionClear()
For security reasons you are not allowed to change permissions on current and parent web sites - applies only to subsites.
 MethodSetPermissionInherit()
Sets web permissions to be inherited from parent. Check description for similar ListRow.SetPermissionInherit().
For security reasons you are not allowed to change permissions on current and parent web sites - applies only to subsites.
 MethodToString()String
Converts Web to String and returns URL part of Link attribute only. Safe to call even if object is null.
 ValueDim x As Web
Declaring new variable of type SharePoint Web