How to Access Custom Entity Services In Velocity template - LDS With DXP?

Chanakya P, modified 2 Years ago. Junior Member Posts: 72 Join Date: 2/17/14 Recent Posts
Unable to access Custom Entity Services In  Velocity template.
Can any help me out.

Steps
    1. Create Service-Builder Module project(CustomEntity)
    2. Update The service.xml with Entity Name => Idea
    3. Gradle buildService and Deploye
    4. Add some master data in Idea Table
    5. Add below code in velocity tempalate (With Structure and Tempalate)
        #set ($customLocalService = $serviceLocator.findService("CustomEntity.service.IdeaLocalService"))
        #set ($number=$customLocalService.getIdeasCount())
        $number
        
    
    CustomEntity.api
    CustomEntity.service
    above both jars availbale in OSGI Folder
    
    And also added below propoerties in portal-ext.propoerties
    velocity.engine.restricted.classes=
    velocity.engine.restricted.variables=
    freemarker.engine.restricted.classes=
    freemarker.engine.restricted.variables=
    
Actual Result:
    $number Showing In UI
Expected Result:
    Count of records of the enity should show
    
    
Used Below Softwares:
    Liferay Development Studio 
    liferay-dxp-digital-enterprise-7.0-sp6
    Patching-Tool: de-69-7010
Chanakya P, modified 2 Years ago. Junior Member Posts: 72 Join Date: 2/17/14 Recent Posts
Hi All, Can any one help me out.