Adm2/smart objects

Hi,

The problem may be small, bt i am explaining it here. Please help me.

----------------------------------------------------------------------------------------------------
I have a SDO, Smart Browser and a Smart Viewer.

I need to validate the fields on Click of save icon in smart panel.

I found preTransValidate procedure in SDO to write my validations but once its validated the focus is not coming to the particular field, instead all the fields are getting disabled.

I could only reset or cancel the transaction.

Any ideas ??

Note: I could only do my validations in pretransvalidate because, I can get the rowobjupd.rowmod value only there. I need to do validations based on add, update or save.
I have done "on Leave " validations in viewer.
 

RealHeavyDude

Well-Known Member
First of all: You should mention your ADM2 / Progress/OpenEdge version as the ADM2 has dramatically evolved since when it was introduced.

The ADM2 provides several slots to do your validation which all have in common that they are fired as soon as you code it either in the SDO or the logic procedure (IIRC logic procedures are a Dynamic features that was made available to the ADM2 around OpenEdge 10):

  1. rowObjectValidate: This procedure will fire in the client-side proxy of the SDO - this is the slot to do validations that can be done without the database connect, in general validations that you would on leave of a field.
  2. pre-, begin-, end-, and postTransactionValidate: These fire on the server-side of the SDO - these are the slots to do validations for which you need the database connected.
The standard behavior is that the fields stay enabled until either the transaction goes through or the business logic comes back with an error message. If the business logic returns an error message the fields stay enabled. Therefore I can only speculate that there is something in your code that is responsible for the fields to be disabled.

To track the issue down, if I were you, I would disable all custom code in your objects and enable it back step by step to find out what causes the fields to be disable even though the save operation is rejected by your business logic.

Regards, RealHeavyDude.
 
Top