A frequent requirement in most Oracle Applications implementations is to be able to conditionally disable one of the components of a Descriptive Flexfield (DFF). DFFs follow the “all or none law” for a given DFF context. If a DFF is displayed, it is enabled and can be changed. The only exception to this rule is when the entire record is read-only. However, if your DFF is using five attributes, there is no mechanism to disable one attribute out of the five attributes. Also, since the DFF window is a user exit call, you cannot disable any attribute field by using set_item_property. We’ll show you how to protect DFF using CUSTOM.pll.
To explain the detailed workings of this technique, consider an example where the DFF is defined on the Invoice Distribution form. For our example, let’s say it has three DFF attributes defined on Attribute1, Attribute2, and Attribute3. Our requirement dictates that the user shouldn’t be allowed to update attribute2, whereas attribute2 should be visible. By this approach we won’t disable the DFF. Rather, we’ll protect the attribute if the user maliciously or unintentionally tries to update attribute2. So we are protecting the attribute rather than disabling it, and we’re also displaying it.
IF event_name = ‘WHEN-VALIDATE-RECORD’ then
‘DFFAttribute at is not Updateable. Modifiedvalue will
revert back to the original value’);fnd_message.show;