cancel
Showing results for 
Search instead for 
Did you mean: 

Update using 'ALF_CRUD_UPDATE' throwing Error while submitting Form

satheeshkumar
Champ in-the-making
Champ in-the-making
Hi All,

When I try to submit my Form for updating one of my custom content model
"hccm:productTypeFolder"
, through
/api/{item_kind}/{item_id}/formprocessor
.

I am getting the below ERROR,

<CODE>2015-04-09 11:10:04,997 [ERROR] org.springframework.extensions.webscripts.AbstractRuntime.executeScript(AbstractRuntime.java:234) Exception from executeScript - redirecting to status template error: 03090003 Script url /api/type/hccmSmiley TongueroductTypeFolder/formprocessor does not support the method PUT
org.springframework.extensions.webscripts.WebScriptException: 03090003 Script url /api/type/hccmSmiley TongueroductTypeFolder/formprocessor does not support the method PUT
        at org.springframework.exten</CODE>

When I browse I came to know like,
FormProcessor doesn't support PUT method.
.

The below tutorial says that,
http://docs.alfresco.com/5.0/tasks/aikau-tutorials-crud-update.html

But I am not able to do the Update using "ALF_CRUD_CREATE", as per the instructions given in the above link, can someone let me know how I can use this "ALF_CRUD_CREATE" to do the update of my custom content type.

Here is my form widget detail,

var editForm = {
   name : "alfresco/forms/Form",
   config : {
      okButtonLabel : "Update",
      okButtonPublishTopic : "ALF_CRUD_UPDATE",
      okButtonPublishGlobal : true,
      okButtonPublishPayload : {
         url : "api/type/hccm%3AproductTypeFolder/formprocessor",
         alf_destination : alfDestination,
      },
      okButtonPublishGlobal : true,
      showCancelButton : false,
      widgets : [ /*All my form widgets goes here */]
   }
};
1 REPLY 1

lementree
Champ on-the-rise
Champ on-the-rise
Hi Sathish,

Form service does not support put, so you should use ALF_CRUD_CREATE even for update.

we have to use the “ALF_CRUD_CREATE” topic to perform a POST request rather than an “ALF_CRUD_UPDATE” topic because the FormsProcessor doesn’t support PUT refer: http://blogs.alfresco.com/wp/developer/2014/09/29/aikau-mini-examples-crud-service-update/
Getting started

Tags


Find what you came for

We want to make your experience in Hyland Connect as valuable as possible, so we put together some helpful links.