on 2015 Dec 01 10:15 AM
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
Request clarification before answering.
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.