Wednesday, January 23, 2008

BC : Force Active Property

This business component property is more powerfull than most people imagine. Why?
It's simple. If used unnecessary it can decrease application performance.
When you set this property to TRUE, it means that this fiels is queried every time business component is instantiated :

  1. Every time you do a BO.GetBusComp(”Name”) in a script.
  2. Every time you navigate in application and the underlying BC is "Name".
  3. BC is accessed internally in any form.

Why?

Every time you make a field Force active it will be made part of where clause each time a query is issued against that BC or table irrespective of the fact that field is required or not.

You can read detailed information here

Thursday, January 17, 2008

EIM : Session SQL

When using EIM to delete,update or insert data, you can perform some post execution operations. Just use SESSION SQL keyword in your IFB, this allow you to execute a query after EIM section ends is execution.
You can read more about it here.

Monday, January 14, 2008

EIM : How to populate S_EVT_ACT contact columns.

This was my last task, populate primary contact columns (target_per_id and pr_con_id) in activities table (s_evt_act). So, I start looking for some eim table to do my job, and after looking my entire references I didn't find one.
And why didn't I found one? Because, there are no explicit way to do it. So what you have to do is :

  1. Populate s_act_contact intersection table with the desired pair activity/contact using EIM_ACTIVITY1.
  2. Set ACT_TARGET_PER and ACT_PR_CON (in EIM table) to 'Y'.
  3. Run EIM task.

Internally EIM will implicitly fill s_org_ext columns for you. Below you can find an ifb excerpt that do what we desire.

[Update Activities]TYPE = IMPORT
BATCH = 4511
TABLE = EIM_ACTIVITY1
ONLY BASE TABLES = S_EVT_ACT,S_ACT_CONTACT

Monday, January 7, 2008

Get ready for Windows Server 2008.

I know this is a little bit off topic, but it's hard to forget our past.
So that's it, Microsoft is offering some free material regarding Windows Server 2008. Check it here.

Hurry up, this offer is limited in time.

Thursday, January 3, 2008

BC : How to make a read-only field

Just create a business component user prop with the following values :

  • Name : Field Read Only Field: Field Name
  • Value : 'N' or 'Y'

If this field changes from read-only to writable depending on other data, just build a calculated field that reproduces the desired behaviour and assign it to the user prop value.