Question

I need pass added parametr when I calling detail

Hi everyone!

Please, help me.

I need pass added parametr for when I calling detail.

I've got ClientModule with details.

One of them is tied to "Opportunity".

I need pass added parametr "Order" for detail when I calling it.

It hepls me use method for calling detail

Like 1

Like

3 comments

You can include values from the page as default values for the detail by modifying the detail definition on the page. 

details: {
    MyDetailSchema: {
        schemaName: "MyDetailSchema",
        entitySchemaName: "MyObject",
        filter: {
            masterColumn: "Id",
            detailColumn: "MyObject"
        },
        defaultValues: {
            UsrSomeName: {masterColumn: "UsrName"},
            UsrSomeDate: {masterColumn: "CreatedOn"}
        }
    }
}

The above will populate the UsrSomeName column on the detail with the value of the UsrName column on the current page and also populate UsrSomeDate on the detail using the value of the CreatedOn of the page. 

You can also use values that don't exist on the page, for example: 

"defaultValues": {
   "UsrSomeDate": { "value": new Date() }
}

Ryan

thank  you, Ryan.

But something wrong.

my page's default:

 

When I boot page, my parametr "CtsTuOpport" is undefined:

 

 

Hi,
The code Ryan provided worked for me, what it does, is automatically fill the detail column when you create a new page:

details: /**SCHEMA_DETAILS*/{
            "Schema685740a4Detail9ea5ec10": {
                "schemaName": "Schema685740a4Detail",
                "entitySchemaName": "TestDet",
                "filter": {
                    "detailColumn": "Order",
                    "masterColumn": "Id"
                },
                "defaultValues": {
                   "UsrSomeDate": {masterColumn: "CreatedOn"}
               }
            }

Perhaps the issue in your case is that you didn't use the "" brackets.

Show all comments