Disabling a Current record in a multi record block [message #188973] |
Tue, 22 August 2006 11:06 |
Praseeja
Messages: 12 Registered: February 2006
|
Junior Member |
|
|
Hi,
The following are the two blocks in the form.
1. Account
2. Service
The Account block have following details:
1. Customer Code
2. Premises Code
The Service Block have the following fields:
1. Service Number
2. Enrollment Status (List Item)
3. Cancel Indicator (Check Box)
The following are the issues:
1. When the service is cancelled the record will be having a Enrollment status with 'X' .
I have to disable the record if the service is cancelled.
For example :
Customer Premises Service Num Status Cancel Ind
-------------------------------------------------------------
1111 1234 100 X(Cancel) Y
1111 1234 200 EN(Enroll) N
When the user navigates between records the record with service num should not be updated but when he navigates to service Number 200 the record can be updated.
I have written code in When-New-Record instance
If Status = 'X' then
Set_item_property('Service_Num',update_allowed,property_false);
Set_item_property('Status',update_allowed,property_false);
Set_item_property('Cancel_ind',update_allowed,property_false);
else
Set_item_property('Service_Num',update_allowed,property_true);
Set_item_property('Status',update_allowed,property_true);
Set_item_property('Cancel_ind',update_allowed,property_true);
end if;
This code works fine when i click on text Items but when i click on Cancel Ind check Box it is not working fine.
For instance:
When the cursor is in service number 100 the record is non-updateable and an error"Field is protected against update" is displayed. But when i click on Cancel Ind of Service Number 200 again the same error"Field is protected against update" is displayed. It should be displayed since the Service Number is not with Cancelled Status.
Thanks and Regards,
Praseeja Chandran
|
|
|
|
|
Re: Disabling a Current record in a multi record block [message #192096 is a reply to message #191585] |
Sun, 10 September 2006 22:59 |
Praseeja
Messages: 12 Registered: February 2006
|
Junior Member |
|
|
In Post Query I have set the Cancel Indicator value.
In Pre Record trigger the following code is written:
If Status = 'X' then
Set_item_property('Service_Num',update_allowed,property_false);
Set_item_property('Status',update_allowed,property_false);
Set_item_property('Cancel_ind',update_allowed,property_false);
else
Set_item_property('Service_Num',update_allowed,property_true);
Set_item_property('Status',update_allowed,property_true);
Set_item_property('Cancel_ind',update_allowed,property_true);
end if;
Regards,
Praseeja
|
|
|