I have a task list and in my task list I am using custom a EditForm.aspx
page instead of default a EditForm.aspx
.
I want to add a ribbon button in my custom form. Actually we are overriding the default EditForm.aspx
and in that form I am adding some custom code.
I check my list in SharePoint Designer and the custom ribbon shows there but it is not added to the ribbon of EditForm.
Here is how I implement a button in the ribbon in my code:
<CustomAction
Id="SaveAndContinueForm.EditFormToolbar"
RegistrationId="150"
RegistrationType="List"
Location="CommandUI.Ribbon.ListView"
Sequence="5"
Title="Save and New">
<!--<UrlAction Url="/crm/Lists/listname/EditForm.aspx"/>-->
<CommandUIExtension>
<CommandUIDefinitions>
<CommandUIDefinition Location="Ribbon.ListForm.Edit.Commit.Controls._children">
<Button
Id="SaveAndContinueForm.Toolbar.Ribbon.Button"
Alt="Save and New"
Sequence="1"
Command="Ribbon.EditForm.Custom.Button.SaveAndContinue"
Image32by32="~site/_layouts/1033/images/SaveAs32.png"
LabelText="Save and Continue"
TemplateAlias="o1" />
</CommandUIDefinition>
</CommandUIDefinitions>
<CommandUIHandlers>
<CommandUIHandler
Command="Ribbon.EditForm.Custom.Button.SaveAndContinue"
CommandAction="javascript:javascriptMethodCall('{ListId}','{ItemId}','{SiteUrl}');"
/>
</CommandUIHandlers>
</CommandUIExtension>
Can anyone please tell me what I am doing wrong?