I have created a custom action on item list menu called Change Status
as shown in the picture
I have created this Custom Action
using the following javascript code:
function AddCustomUserActionToECB() {
//Get the client context,web and list object
var clientContext = new SP.ClientContext();
var oWeb = clientContext.get_web();
var oList = oWeb.get_lists().getByTitle('helpdesk');
var userCustomActionColl = oList.get_userCustomActions();
var oUserCustomAction = userCustomActionColl.add();
oUserCustomAction.set_location('EditControlBlock');
oUserCustomAction.set_sequence(100);
oUserCustomAction.set_title("Change Status");
oUserCustomAction.set_url("/helpdesk/Lists/helpdesk/EditForm.aspx?ID={ItemId}");
oUserCustomAction.update();
clientContext.load(userCustomActionColl);
clientContext.executeQueryAsync(QuerySuccess, QueryFailure);
}
function QuerySuccess() {
console.log("Custom Action added to ECB menu.");
}
function QueryFailure() {
console.log('Request failed - ' + args.get_message());
}
But I can only go to the edit mode of that item. But what I want is when we click at Change Status
to automatically change the Title
field to AutoGenerated
. How can i do that?