cancel
Showing results for 
Search instead for 
Did you mean: 

How to edit extended schema

Former Member
0 Kudos

Hi All,

I am unable to find edit option for extended schema.

I have one requirement where I need to add one check box field in master agreement, when this check box is checked then alerts and notices will not be sent to collaborators.

Please help me if anyone has idea on how to handle it.

Regards,

Prabhat

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi

You can try below mentioned approach in a document Lifecycle Management script with target either Save or Validate

1. Get the value of checkbox usine getExtensionField() method.

2. RGet all the collaborators for current doc using getCollaborators()

3. Run a loop to visit each collaborator

4. Use if condition to set Silent field to TRUE using setSilent() for collaborators in case Above checkbox field is ticked.

5. Save

Regards

Mudit Saini

Former Member
0 Kudos

Hi Mudit,

How to add extended field for check box, when I am checking extended schema then it does not have any option to edit it.

So how to edit this extended schema?

Regards,

Prabhat

Former Member
0 Kudos

Hi

1. Go to Setup->Configuration-> Extension Definition

2. Open Master Agreement (Extended Class Name: Master Agreement), go to Attributes

3. Click Create to create checkbox field, give internal name and display name and select Data Type as Boolean

4. Save

Also it is not possible to delete extended fields however you can choose to make them INACTIVE by setting INACTIVE = TRUE.

Hope this helps

Regards

Mudit Saini

Former Member
0 Kudos

I am trying to create a method in javascript Validate and getting parsing error while retrieving values in collaborators.

setSilentCollaborator()

{

Silent = doc.getExtensionField("DO_NOT_SEND_ALERT").get();

IF(hasValue(Silent))

{

collaborators = doc.getCollaborators();

FOR (var i=0; row = collaborators.rows<i>; i++)

{

// Iterate through Loop and set silent field for all collaborators

collaborators.setSilent()<i> = "TRUE";

} //FOR (var i = 0; row = Collaborators.rows<i>; i++)

}//IF(hasValue(silent))

}

Can you tell me what am I doing wrong?

Regards,

Prabhat

Former Member
0 Kudos

Hi

Type IF and FOR in lowercase.

Regards

Mudit Saini

Former Member
0 Kudos

Parser error is resolved but somehow its still sending the mails, I have tried to implement this code in Validate script.

I couldn't find any script for pre save but there is post_save script.

Regards,

Prabhat

Former Member
0 Kudos

Hi

Try the following code:

import com.frictionless.api.ibean.IBeanIfc;

import com.frictionless.api.usermgmt.masterdata.UserAccountIBeanIfc;

import com.frictionless.api.ibean.OrderedSubordinateCollectionIfc;

import com.frictionless.api.contracts.*;

import java.util.*;

import java.text.SimpleDateFormat;

import com.frictionless.api.contracts.ContractIBeanIfc;

import com.frictionless.api.ibean.OrderedSubordinateCollectionIfc;

import com.frictionless.api.doc.collaboration.CollaboratorIBeanIfc;

logMsg = Logger.createLogMessage(session);

Silent = doc.getExtensionField("DO_NOT_SEND_ALERT").get();

if(hasValue(Silent))

{

CollaboratorCollection = doc.getCollaborators();

collectionsize = CollaboratorCollection.size();

if(collectionsize >0)

{

for(Iterator iterator1 = CollaboratorCollection.iterator(); iterator1.hasNext();)

{

CollaboratorIBeanIfc Collaborator = (CollaboratorIBeanIfc)iterator1.next();

if (Collaborator.getSilent().toString( ).equals ("false") )

{ Collaborator.setSilent(true);}

}

}

}

Also make sure you perform the following steps to trouble shoot:

1. Once script is executed, open the collaborator from the list and check status of Do Not Send Collaborator Alerts or Notices checkbox.

2. In case you are facing some error during execution, open the log file and trace the possible cause

Regards

Mudit Saini

Edited by: Mudit_UCB on Nov 15, 2011 12:59 PM

Former Member
0 Kudos

Thanks Mudit, you have helped me alot.

I am new to CLM and I dont have prior knowledge of Java scripts.

Do you have some Technical tutorials for CLM, it would be great if you can share it. thanks for all your help.

Answers (0)