cancel
Showing results for 
Search instead for 
Did you mean: 

To make final signed document field as mandatory

Former Member
0 Kudos

Hi Experts,

We are in Sourcing 10.0.

We have a business requirement to make "File Name" fields as mandatory (Final signed document) which gets activated after Executed phase.

I have tried using page Customization by adding dimension field to it, but its not working.

Also written script on validate event but that too also doesn't serving the purpose. As field is getting enabled after Executed phase.

Below is the code

if(doc.getCurrentPhase().getDisplayName(session).equals("Executed")){

  //if(other_phase.equals("Internal Signing") && current_phase.equals("Executed")){

//throw new ApplicationException(doc.getCurrentPhase().getDisplayName());

//throw new ApplicationException(doc.getCurrentPhase().getDisplayName(session));

if(!hasValue(doc.getFieldMetadata("SIGNED_DOC").get(doc)))

{throw new ApplicationException("please select file");

}

}

Can anyone help me on this how to resolve this.

Any leads would be of great help!!

Regards,

Geetika

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Geetika,

You can try the following script in Contract Document Post Phase script.

if(doc.getCurrentPhase().getDisplayName(Session).equals("Executed")){

AttachmentIfc finalDoc = (AttachmentIfc)doc.getFieldMetadata("SIGNED_DOC").get(doc);

if(! hasValue(finalDoc))

{

throw error msg;

}

}

Hope this will help you!

Regards

Krish

Former Member
0 Kudos

Hi Krish,

Many thanks for your input.

I have tried the code on post phase event but then it throws the error only one time and allow me to save the document without attaching file.

is there any other way to do it,? Any leads would be of great help!!

Regards,

Geetika

Former Member
0 Kudos

Hi Geetika,

I agree, it will give error msg only once.

As we understood while we were implementing this req..

Since it is Post phase change script, once the document phase is moved to Executed, the script will trigger and shows error msg. It won't check second time whether file has been attached or not, because by that time the script execution is completed.

I think, we do not have any other event to place this code to stop user to go further until he attach the file. Because the file attachment option will be available only after moving the document to executed phase.

Thanks

Krish

Answers (0)