Question

Updated instructions for setting up landing pages for a custom object?

Are there updated instructions for setting up landing pages for a custom object?

The new academy docs no longer includes a page on this topic (clicking the link for this on the landing page in Creatio now just takes you to a Landing Page FAQ page with no useful info on the topic https://share.customerfx.com/Z4uo7jwx)

The page from the old version of the docs here https://academy.creatio.com/documents/technic-sdk/7-16/setting-web-form… includes steps for MSSQL database and not Postgresql, so wondering if there's an easier route to take now or maybe I just need to translate the MSSQL syntax to postgre?

Thanks, Ryan

Like 0

Like

3 comments

Hello Ryan, 



Thank you for noting this. 

We will pass this request to the academy team so they will add the mentioned information and scripts to the new academy article.



Kind regards,

Roman

HI Roman,

 

Im trying the scripts for Postgre sql , but when i try to install , it fails. Any update on the scripts for Postrgre db?

 

-- Parameters of new landing page

DECLARE @editPageName nvarchar(250) = N'PTPEventRegistrationWebFormPage'; -- declare the name of the created schema

DECLARE @landingTypeName NVARCHAR(250) = N'Event Registration'; -- the type name of the landing

DECLARE @actionCaption NVARCHAR(250) = N'Event Registration'; -- declare the type name for the landing in the section when creating a new record

 

-- Set system parameters based on new landing page

DECLARE @generatedWebFormEntityUId uniqueidentifier = '41AE7D8D-BEC3-41DF-A6F0-2AB0D08B3967';

DECLARE @cardSchemaUId uniqueidentifier = (select top 1 "UId" from "SysSchema" where "Name" = @editPageName);

DECLARE @pageCaption nvarchar(250) = (select top 1 "Caption" from "SysSchema" where "Name" = @editPageName);

DECLARE @sysModuleEntityId uniqueidentifier = (select top 1 "Id" from "SysModuleEntity" where "SysEntitySchemaUId" = @generatedWebFormEntityUId);

DECLARE @landingTypeId uniqueidentifier = (SELECT TOP 1 "Id" FROM "LandingType" WHERE "Name" = @landingTypeName);

 

-- Adding new Landing page variant to application interface

INSERT INTO public."SysModuleEdit"

("Id", "SysModuleEntityId", "TypeColumnValue", "UseModuleDetails", "CardSchemaUId", "ActionKindCaption", "ActionKindName", "PageCaption")

VALUES

(NEWID(), @sysModuleEntityId, @landingTypeId, '1', @cardSchemaUId, @actionCaption, @editPageName, @pageCaption);

Sri Saranya,

A quick and easy way to do this is to make a copy of an existing landing page type and then make some tweaks. To do this:

 

1) First make sure you've added the new type to the Landing types lookup

 

2) Go to the Landing Pages section and open it in the section wizard

 

3) Make a copy of the one of the existing pages, but DON'T use the lead one (it has some differences). To do this, click the 3-dot button and select copy

 

4) When prompted select the new type for this new landing page (from #1 above)

 

5) After #4 the new landing page copy will open. I usually click the gear in the top-right and give the new page a different name, then save

 

6) In the configuration, open the new landing page you created.

 

7) Look in the methods. If you copied from the EventTarget landing page, you'll see code referencing the resource string "EventTargetScriptTemplate", rename this for your entity and then also rename the associated resource string to match

 

8) If wanted, edit the contents of the resource string from #7 and also the one named "ScriptTemplate" - this is just for looks really, it won't affect the landing page if you don't do this part in #7 and #8. It's the sample text in "STEP 2" of the landing page.

 

Ryan

Show all comments