/o//commerce-media/accounts/-1/images/18448953?download=true

Web content Create Date Hook
Icon
DXP App
18448900
Some time we are having requirement that we need to upload the web content with some back date. For example one of our news based portals we were required to have an option that, user can change the create date of web content at the time of uploading.
We are going to use the Service hook. We are going to hook
com.liferay.portlet.journal.service.JournalArticleLocalService
We will use the expando bridge to get the latest created date from the user.
Create 2 custom fields as shown in the snap shots. The field name could be createDate(Date) and changeCreateDate(Boolean).
Else you can change the name and update them in the portlet.properties file.
##Specify the name of field specified in the custom fields..
1. Field to check if the user want to change the create date of a journal article or not (Boolean type)
override.change.create.date.field.name = changeCreateDate
2. Field to be scanned for the create date as set by the user (Date type)
create.date.field.name = createDate
These 2 fields will decide whether to update the create date or not.
DEVELOPER
Mohd Danish
DEVELOPER
6/24/14 12:00 AM
Published date
June 24, 2014
Published Date
6/24/14 12:00 AM
SUPPORTED OFFERINGS
Self-Hosted, Self-Managed
Supported Versions
6.2
Resource Requirements
Edition
CE, EE
PRICE
Free
help & support
Terms & Conditions
SHARE LINK
Copy & Share Link

HTML Example

A paragraph is a self-contained unit of a discourse in writing dealing with a particular point or idea. Paragraphs are usually an expected part of formal writing, used to organize longer prose.