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

Custom Collection to be made Mandatory

Former Member
0 Kudos
87

Hi,

I have created an extension collection on the Projects module and want to make it mandatory. I used Page Customization to make the collection mandatory, but the attribute is not geeting applied to the field.

How can I make the collection mandatory, I dont want to make the field through the extension attribute.

Please advice

Regards,

Pankaj

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi Pankaj,

You can write a script to make the collection mandatory. Try this:

ExtensionCollectionIfc extCollection=doc.getExtensionCollection("XXXXXXXX");

        if (extCollection==null || extCollection.size()==0)

        {

              throw new ApplicationException("ERROR_ MESSAGE");

        }

This would make the collection mandatory.

Hope this would resolve your issue.

Regards,

Kumud