cancel
Showing results for 
Search instead for 
Did you mean: 

Getting display name of Agreement

Former Member
0 Kudos

Hi,

I am using sourcing 7.0. I have a requirement to set the Display Name iin an agreement to "Sub:" instead of the default "Subagreement:".

I am trying to achieve this through script. I have created a Document life cycle script with class as Agreement and target as Created. Below is the script, however I receive the displayname as null from below script.

The document home comes as "com.sap.eso.api.contracts.AgreementIBeanHomeImpl".

Can anyone help.

***************************************************************

// Get logger

logMsg =Logger.createLogMessage(session);

Logger.info(logMsg.setLogMessage("*********Setting DisplayName of SubAgreement**********"));

Logger.info(logMsg.setLogMessage("*********Document home**********" + doc.getIBeanHomeIfc()));

displayName = doc.getDisplayName();

Logger.info(logMsg.setLogMessage("*********displayName:1**********" + displayName));

***************************************************************

Regards

Moumita

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi Moumita,

If the requirement is that you want that requirement for all the subagreement names , you can directly change the localized

resource contracts.agreement.name_prefix default value to Sub instead of Subagreement:

Coming to your scripting,as you are writing the script at created Context.. the display name of master Agreement would be null.. only when you save the document there would be value for name.

Regards,

Uday

Former Member
0 Kudos

Thanks Uday.

Changing the localized resource solves my problem.