list - SharePoint Autohosted App and User Custom Actions -


i set sharepoint autohosted app. created app event receiver handles spremoteeventtype.appinstalled event. while installing app code of mine creates list on host web. list needs have custom action ( button ) in "ribbon.documents.new" area.

adding via add new item working fine, if list exists wont work me.

now wanted same thing in c#.

public void addcustomaction(string targetlistname,string xmlschema, int sequence, string title, clientcontext ctx)     {         list targetlist = getlist(targetlistname);         ctx.load(targetlist);         usercustomaction customaction = targetlist.usercustomactions.add();         customaction.location = "commanui.ribbon";         customaction.sequence = sequence;         customaction.commanduiextension = xmlschema;         customaction.title = title;         customaction.update();         ctx.executequery();      } 

i copied xml schme commanduiextenstion visual studio generated me. not throw error while debugging button wont appear on host web list. doing wrong? anny suggestion?

thanks in advance,

philip


Comments

Popular posts from this blog

Android layout hidden on keyboard show -

google app engine - 403 Forbidden POST - Flask WTForms -

c - Why would PK11_GenerateRandom() return an error -8023? -