In tridion, I am working on a customization at the component presentation level. My exact task would be to add an extra tab containing 2 text fields under the tab on the right side pane when we click on a component presentation in a page. The data from these fields are stored and retrieved from the AppData table.
For this, we have a JS file which calls a method in web service call (.svc.cs file) which in turn would process the data and store it in AppData table. My issue is I am unable to debug whether the service call is getting executed or not. I have placed alerts before and after the call in the JS file and they are getting executed but still the service call method is not getting executed as I can see no data is entered in the DB. I have tried writing log statements inside the method I am calling from JS file but the logs are not getting generated. I am unable to decide where it is getting stuck or how I should debug.
Below is the line in JS file which calls the webservice method:
alert("entered");
*Namespace*.Process(selection.getItem(0), "fighting for freedom");
alert("completed");
This process method is in a .svc.cs file as below:
public void Process(string pageID, string content)
{
try
{
WriteLog("Entered Process");
WriteLog("Page ID : " + pageID);
WriteLog("Content : " + content);
readOptions = new ReadOptions();
channel.Impersonate(Tridion.Web.UI.Core.Utils.GetUserName());
IdentifiableObjectData oD = channel.Read(pageID, readOptions);
Logger.WriteWarning("Calling StoreInAppData Method", ErrorCode.GENERAL);
StoreInAppData(pageID, content);
}
catch (Exception ex)
{
throw ex;
}
finally
{
if (channel != null && channel.State != CommunicationState.Closed)
{
channel.Close();
}
}
}
We have used a local method Writelog to generate logs and also tried the Tridion Logger.WriteWarning. Both do not generate any logs. Does this mean the call from the JS file is never reaching the method for some reason? If the method is not getting called, why is the second alert alert("completed");
coming up?
Thanks in advance for you replies!