Question

In freedom UI client side coding, how to check if it is add mode or edit mode

Hi Community,

 

In freedom UI client side coding, how to check if it is add mode or edit mode? In classic UI this is possible.

 

 

Like 0

Like

2 comments

The $context has a few ways to check this, one way is to check the CardState: 

const cardState = await request.$context.CardState;
if (cardState == "add" || cardState == "copy") {
    // do something here
}

Ryan

Ryan Farley,



Hi Ryan,

We are using version 8.1.1. However, it seems request.$context.CardState attribute seems to be null.


 

Show all comments