Skip to Content
author's profile photo Former Member
Former Member

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

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

Add a comment
10|10000 characters needed characters exceeded

Related questions

1 Answer

  • author's profile photo Former Member
    Former Member
    Posted on Jan 02, 2014 at 11:09 AM

    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

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.