However, this doesn't work in Deleting events, only Updating and Adding.
public class CustomEventReceiver : SPItemEventReceiver
{
HttpContext current = null;
public CustomEventReceiver() : base()
{
current = HttpContext.Current;
}
}
public class CustomEventReceiver : SPItemEventReceiver
{
HttpContext current = null;
public CustomEventReceiver() : base()
{
current = HttpContext.Current;
}
}
<%if (Teasers11.ControlMode != SPControlMode.Display)
{%>
<SharePointWebControls:CheckBoxChoiceField FieldName="Teasers" runat="server" id="Teasers11"/>
<%} %>
String listurl = "http://sp:40006/Planets/Mars/Lists/Moonlist/AllItems.aspx";
SPList planetList;
using (SPSite sps = new SPSite(listurl))
{
using (SPWeb spw = sps.AllWebs[sps.ServerRelativeUrl])
{
planetList = spw.GetList(listurl);
}
};
ApproverPickerEntityEditor AppPicker = new ApproverPickerEntityEditor();
AppPicker.CustomProperty = BusinessAreaPicker.SelectedValue;
public class ApproverPickerDialog : PickerDialog
protected override void OnLoad(EventArgs e)
{
ApproverQueryControl thisQC = (ApproverQueryControl)this.QueryControl;
thisQC.SelectedBusinessArea = this.Page.Request.QueryString["CustomProperty"];
base.OnLoad(e);
}
<customaction id="CustomPagesAdministration"This will only show up for users that have "Approve" rights on the pages library.
groupid="SiteActions"
location="Microsoft.SharePoint.StandardMenu"
sequence="0" title="Pages Administration"
rights="ApproveItems">
<urlaction url="Pages/Forms/AllItems.aspx">
</urlaction>
</customaction>
w.Fields.AddLookup(FieldName, LookupList.ID, false);Where:
w.Fields[FieldName].Group = "My Columns";
SPFieldLookup f = (SPFieldLookup)w.Fields[FieldName];
f.AllowMultipleValues = true;
w.Fields[FieldName].Update(true);