Skip to main content

Dear All,

 

Does anyone kow if it possible to make the fields in Miscellaneous ready only when you create a new Application for payment fot out a sales contract?

 

Can this be done in the persmission sets?

 

My idea was disable some with APi.new but then i'm unable to create them or it has no effect.

 

Anyone an idea?

 

 

Hi @RLGroener,

I would suggest you to create a custom event as a workaround and then validate the default values fetched based on the Sales Contract No for each field in Miscellaneous group box.

Custom Event
Custom Event Action
DECLARE
lu_name_ CONSTANT VARCHAR2(30) := 'AppForPayment';
contract_no_ VARCHAR2(15) := '&NEW:CONTRACT_NO';
BEGIN
IF ((NVL('&OLD:RECOGNIZE_PERCENTAGE', -1) <> NVL('&NEW:RECOGNIZE_PERCENTAGE', -1)) AND (NVL('&NEW:RECOGNIZE_PERCENTAGE', -1) <> NVL(Sales_Contract_API.Get_Recognize_Percentage(contract_no_), -1))) THEN
Validate_SYS.Item_Update(lu_name_, 'RECOGNIZE_PERCENTAGE', TRUE);
END IF;
END;

Please note that I have implemented the Event Action to only validate "% To Recognize" field (RECOGNIZE_PERCENTAGE column).
You may use the below method to develop for the rest of the fields in Miscellaneous group box.

Field Column Name Method to check with the Sales Contract
Paying Customer ID
PAYER

 

Sales_Contract_API.Get_Payer(contract_no_)

 

Payment Terms
PAY_TERM_ID

 

Sales_Contract_API.Get_Pay_Term_Id(contract_no_)

 

Due Date
DUE_DATE

 

App_For_Payment_Api.Get_Due_Date__(due_date_, Sales_Contract_API.Get_Company(contract_no_), Sales_Contract_API.Get_Pay_Term_Id(contract_no_), application_date_)

 

Certificate Due Date
CERTIFICATE_DUE_DATE

 

App_For_Payment_Api.Calc_Certificate_Due_Date__(certificate_due_date_, contract_no_, application_date_)

 

Document Address
DOCUMENT_ADDRESS

 

Contract_Customer_API.Get_Paying_Cust_Doc_Address(contract_no_, Sales_Contract_API.Get_Payer(contract_no_))

 

 

Cheers !
Dhananjaya.