Skip to Content
avatar image
Former Member

Check if there is an attachment on RFX Response

Hi

Please assist. I need to write a script that checks if there is an attachment before moving the status to "Firm". Please see attached picture

If attachment does not exist, I will throw this message : throw doc.createApplicationException("session","Please Attach File");

Thanks

RFX_response.PNG (357.9 kB)
Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

1 Answer

  • avatar image
    Former Member
    Nov 03, 2015 at 06:55 AM

    Hi

    I have actually written the script already, but the problem is the script is executed whenever a change is made to the document. I want it to execute only when the status is changed to "Firm".

    Below is my script:

    import java.util.*;

    import com.sap.eso.api.rfx.*;

    import com.sap.odp.api.common.platform.IapiDbHandlelfc;

    import com.sap.odp.api.doccommon.masterdata.*;

    import com.sap.odp.api.comp.messaging.*;

    import com.sap.odp.common.types.Attachment;

    ApplicationException ae = new ApplicationException(session);

    attach = doc.getAttachments();

    if(attach.size() == 0)

    {

    throw doc.createApplicationException("session","Please Attach File");

    }

    Add comment
    10|10000 characters needed characters exceeded