cancel
Showing results for 
Search instead for 
Did you mean: 

Change the document type of the Master Agreement document when it is duplicated

Former Member
0 Kudos

I need to change the document type of the Master Agreement document when it is duplicated.

I have checked the methods of ContractIBeanIfc class, but it has only getDocTypeReference method. There is no setDocTypeReference

For the other object references like Company or Organization I could find the set method, and I do not see why there is no set method for the document type.

Can you please advise?

Thank you a lot

Noppong

Accepted Solutions (1)

Accepted Solutions (1)

0 Kudos

Hello,

You are correct.  There is no way to set the document type on an existing object.  The software does not support this.  Perhaps if you describe why you need to change the type, or what data you need to copy from the source document to the new target, someone might be able to suggest a solution.

Thanks

Former Member
0 Kudos

Hi Robert,

     Thank you for your answer.

     If the standard duplication function does not allow to change the document type, i am thinking to write a custom script to create the new Master Agreement by using "IBeanHomeIfc.create(int typeId)" and then copy all the fields from the old one to the new old. I am not sure whether it will work or not.

Thank you,

Noppong

Former Member
0 Kudos

Hi Noppong,

You can create a new Master Agreement using doc.getIBeanHomeIfc().create();

It will create a new Master Agreement for you. Please ensure that you have copied across all mandatory fields to the new one from the old one via scripting. In the end you use doc.getIBeanHomeIfc.save() to save the MA. 

Hope this way you can get your issue solved.

Regards,

Kumud

Answers (0)