Question

FreedomUI - crt.OpenPageRequest in edit mode ?

Hello community,

 

I see that this 'crt.OpenPageRequest' system query initialize page in add mode but i would like to run page in edit mode and pass record id parameter. Is it possible ?

 

I know from academy that i can use 'crt.UpdateRecordRequest' insted but then i can't pass page schema name.

 

Best regards,

Marcin

Like 0

Like

6 comments
Best reply

Marcin Kott,

I checked a few places where I am opening a specific page and I am actually using a crt.OpenPageRequest (not a crt.UpdateRecordRequest), but also passing a record Id and edit mode. My request looks like this:

request.$context.executeRequest({
    type: "crt.OpenPageRequest",
    $context: request.$context,
    schemaName: "UsrCaseStatus_ModalPage",
	modelInitConfigs: [
		{
			action: "edit",
			recordId: caseId
		}
	]
});

I wrote that up here https://customerfx.com/article/opening-a-record-for-edit-in-a-specific-…

Ryan

Thank, but the problem is that i have more that one page for my custom entityschema (datasource). How then set which page i would like to open ?

 

As a workaround of course i may do this invoking process and use preconfigured page.

 

Marcin

Marcin Kott,

You can include the following in the request:

schemaName: "UsrMy_FormPage"

This will force the use of that specific page to open.

Ryan

            await handlerChain.process({
                type: 'crt.UpdateRecordRequest',
                schemaName: 'UsrPage_GUSDetail',
				entityName: 'UsrDaneZBazyGUSLinie',
				recordId: request.$context.PId.__zone_symbol__value,
                $context: request.$context
            });

Unfortunately, Creatio seems to be ignoring schemaName param or You had another ideas ? When i'm using this code Creatio opens default edit page for passed entityname. Without entityname param Creatio throw error.

Marcin Kott,

I checked a few places where I am opening a specific page and I am actually using a crt.OpenPageRequest (not a crt.UpdateRecordRequest), but also passing a record Id and edit mode. My request looks like this:

request.$context.executeRequest({
    type: "crt.OpenPageRequest",
    $context: request.$context,
    schemaName: "UsrCaseStatus_ModalPage",
	modelInitConfigs: [
		{
			action: "edit",
			recordId: caseId
		}
	]
});

I wrote that up here https://customerfx.com/article/opening-a-record-for-edit-in-a-specific-…

Ryan

Ryan Farley,

 

Perfect. Works as expected.

Thank a lot.

 

Marcin

Show all comments