on 2011 Dec 06 1:15 PM
Hi!
I have a scripting issue that I need some help with please - in a version 7.0 system.
The scenario is a contract pre-phase change script, where I need to check that there is a value in the Renewal Reminder Date on the parent Master Agreement / Agreement document, if certain conditions are met in the contract.
The problem is that:
1. There is no method to get this property.
2. The Renewal Reminder Date property is not listed in IAPI so I don't think retrieving the metadata for the field will work either.
3. I have tried reading the value via SQL using the following code, but this returns no value, so either this approach is flawed or my coding is just wrong...
renewal_date = dbHandler.executeIsolatedQuery("SELECT T1.RENEWAL_REMINDER_DATE FROM FCI_CONTRACT T1 WHERE T1.OBJECTID = "+parentObjId);
The parentObjId reference above seems valid because it is used successfully else where.
Any thoughts / comments / feedback would be much appreciated!
Regards,
Stuart
Request clarification before answering.
Hi Stuart,
I can see in Reference Guide that there is API available for RENEWAL_REMINDER which is getRenewalReminder().
In case you are not able to find the API for RENEWAL_REMINDER can you please try this way:
String masterAgreementBeanName = doc.getDisplayName();
String masterAgreeRenewal="select fci_contract.renewal_reminder_date" +
" from fci_contract where fci_contract.display_name="+"'"+masterAgreementBeanName+"'";
//print String you will get date in string
if(masterAgreeRenewal!=null)
{
Date masterAgreeRenewalReminder=(Date) dbHandle.executeIsolatedQuery(masterAgreeRenewal);
Calendar cal2=Calendar.getInstance();
cal2.setTime(masterAgreeRenewalReminder);
renewalReminderDate= TypeFactory.createSysDate(cal2.getTime());
//print the object renewalReminderDate. It should give you date
}
Hope this helps.
Regards,
Kumud
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.