You need to sign in to do that
Don't have an account?
SFDCmack08180939826349907
Hey I am trying to delete an KB article from a button I have developed the code but its not work
I get an unexpected token: 'execute' in line 3 any know what I am doing wrong?
Public class KBDelete{
public static void PageReference execute(){
Id id = ApexPages.currentPage().getParameters().get('id');
String articleId = 'id';
KbManagement.PublishingService.archiveOnlineArticle(articleId, null);
}
}
Visualforce
<apex:commandButton value="Delete" action="{!execute}"></apex:outputLink></apex:commandButton>
Public class KBDelete{
public static void PageReference execute(){
Id id = ApexPages.currentPage().getParameters().get('id');
String articleId = 'id';
KbManagement.PublishingService.archiveOnlineArticle(articleId, null);
}
}
Visualforce
<apex:commandButton value="Delete" action="{!execute}"></apex:outputLink></apex:commandButton>
You need to modify your controller code as below.
Apex Class: Thank You,
Hitesh Patel
Email :- hiteshpatel.aspl@gmail.com
http://mrjavascript.blogspot.in/