Database entries required for creating a new view in WCS 5.6
Published February 19th, 2008 in WebSphere, WebSphere Commerce
To create a new view command in WCS 5.6 we need to make a couple of database entries. i.e., we need to make an entry in VIEWREG, ACACTION, ACACTDESC, ACACTACTGP tables. For e.g.: if we want to make a new view command ‘MyNewView’, the database entries for this view command to work will be.
INSERT INTO VIEWREG(VIEWNAME, DEVICEFMT_ID, STOREENT_ID, INTERFACENAME, CLASSNAME, PROPERTIES, DESCRIPTION, HTTPS, INTERNAL) VALUES ('MyNewView', -1, 1000, 'com.ibm.commerce.command.ForwardViewCommand', 'com.ibm.commerce.command.HttpForwardViewCommandImpl', 'docname=MyNewView.jsp' , 'My New view', 0, 0); INSERT INTO ACACTION(ACACTION_ID, ACTION) VALUES ((SELECT MAX(ACACTION_ID)+1 FROM ACACTION), 'MyNewView'); INSERT INTO ACACTDESC(ACACTION_ID, DISPLAYNAME, DESCRIPTION, LANGUAGE_ID) VALUES ((SELECT ACACTION_ID FROM ACACTION WHERE ACTION='MyNewView'), 'MyNewView', 'MyNewView', -1 ); INSERT INTO ACACTACTGP(ACACTGRP_ID, ACACTION_ID) VALUES ((SELECT ACACTGRP_ID FROM ACACTGRP WHERE GROUPNAME='AllSiteUsersViews'), (SELECT ACACTION_ID FROM ACACTION WHERE ACTION='MyNewView'));
Here the storeId I used is 1000 and the viewname is ‘MyNewView’. This is the easiest way of creating a new view command in WebSphere Commerce Server 5.
Did you like this? If so, please about it, and subscribe to the blog RSS feed.If you enjoyed this post, make sure you subscribe to my RSS feed!



























Related Posts:
No Responses to “Database entries required for creating a new view in WCS 5.6”
Please Wait
Leave a Reply