Hi
please help or suggest.
I'm setting a Delivery To Location on Purchase Order Distribution Block required, so that when users a trying to save the record a message should pop up notifying then that they must populate the DELIVERY TO LOCATION address field i've used the
GO_BLOCK but im getting this error
frm-40737: illegal restricted procedure go_block in WHEN-VALIDATE-RECORD trigger.
Please help and see my code below.
begin
app_item_property2.set_property ('PO_DISTRIBUTIONS.DELIVER_TO_LOCATION',required,property_true);
if name_in('PO_DISTRIBUTIONS.DESTINATION_TYPE') = 'Inventory' then
app_item_property2.set_property ('PO_DISTRIBUTIONS.DESTINATION_SUBINVENTORY',required,property_true);
end if;
if p_event_name = 'WHEN-VALIDATE-RECORD' then
if p_block_name = 'PO_LINES' then
if name_in('PO_DISTRIBUTIONS.DELIVER_TO_LOCATION') is null then
fnd_message.set_name('XX','XX_PO_DELIVER_TO_LOCATION');
fnd_message.error;
raise form_trigger_failure;
end if;
if name_in('PO_DISTRIBUTIONS.DESTINATION_TYPE') = 'Inventory' and name_in('PO_DISTRIBUTIONS.DESTINATION_SUBINVENTORY') is null then
fnd_message.set_name('XX','XX_DESTINATION_SUBINVENTORY');
fnd_message.error;
raise form_trigger_failure;
end if;
end if;
end if;
exception
when FORM_TRIGGER_FAILURE then
Go_Block('PO_DISTRIBUTIONS');
IF NOT FORM_SUCCESS THEN
RAISE Form_Trigger_Failure;
END IF;
when others then
Raise;
end;