cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Scripting - is it possible to access a field value not exposed in IAPI?

Former Member
0 Likes
132

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

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Likes

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