Non-Persistent Field on an MBO

There are some situations in which we need a place-holder sort of to show dynamic data like to show the calculated tax or to show time remaining between planned completion date and current date.

The best way to achieve this is to use non-persistent field.

Following are the steps:

1) Go to Database Configuration, search the table where we want to add the non-persistent field.

2) Go to Attribute tab and add a new field, make sure the “persistent” checkbox is unchecked.

3) Apply configuration changes

The field is created and if you see the table in your database it won’t exist as a column.

The next step is to calculate the tax and show on this field. Create a class which extends psdi.mbo.MboValueAdapter.

Override the “initValue” method. The thing to notice here is if it would have been a persistent field we would be overriding “init” method.

Do the calculations there and “getMboValue().setValue(“value”,NOACCESSCHECK)” and we are done πŸ™‚

All these articles assume you have a good understanding of Java and are aware of database fundamentals.

Regards,

Admin

Advertisements

2 thoughts on “Non-Persistent Field on an MBO

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s