cancel
Showing results for 
Search instead for 
Did you mean: 

A link to create master agreement in a user defined object

Former Member
0 Kudos

Hi guys,

We have a requirement wherein we need to put a toolbar link in a UDO to create a master agreement. Certain fields from the UDO needs to be carried over to the master agreement.

Any pointers would be extremely helpful..

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi Immanuel,

we have a similar requirement. Have you been able to figure this out?

regards

Sub

Former Member
0 Kudos

Hi sub,

I was able to create the master agreement through a toolbar script. Java API's are available to create a master agreement.

The steps would be:

1) Create a Contract Bean of a praticular document type

2)Use the setter functions to set the required data. (Take care to fill in the mandatory fields)

3)save the contract bean.

Additionally you could place a document link in the UDO and a document link in the Master agreement, therby linking the 2 documents. The links are also created using Java API's.

Hope this helps

Regards,

Immanuel

Former Member
0 Kudos

hi reshma,

Here is the code for contract creation. Please Note: Other mandatory fields, depending on your MAster agreement document type has to be set before you save the Contract.

contractHome =IBeanHomeLocator.lookup(session, ContractIBeanHomeIfc.sHOME_NAME);

//Creates a contract bean. The input parameter is an Master Agreement type

contractBean = contractHome.create("master agreement typet");

/Set the Required fields in the contract/

//example to set few fields

valueTypeHome=IBeanHomeLocator.lookup(session,ValueListTypeIBeanHomeIfc.sHOME_NAME);

valueTypeBean=valueTypeHome.findByExternalId("master_agreement_status");

valueBean=valueTypeBean.getCollnValueListValue().get(0);

contractBean.setStatusRef(valueBean.getLocalizedObjectReference());

//set display name

contractBean.setDisplayName("Test"+doc.getDisplayName());

//Set currency

contractBean.setCurrency(doc.getCurrency());

//set effective date

contractBean.setEffectiveDate(TypeFactory.createSysDate(new java.util.Date()));

//set base date

contractBean.setBaseDate(doc.getBaseDate());

//set contact info

vendorCollection = doc.getCollnVendors();

vendorRef=vendorCollection.get(0);

contact=vendorRef.getContactObjRef();

contractBean.dbSetContactRef(contact);

contractBean.dbSetVendorRef(vendorRef.getVendorObjRef());

/Set other necessary information in the contract bean/

//Save the Contract

contractHome.save(contractBean);

Former Member
0 Kudos

blank post.

Edited by: immanuel farrar on Mar 16, 2010 4:42 AM

Former Member
0 Kudos

Blank post.

Edited by: immanuel farrar on Mar 16, 2010 4:41 AM

Former Member
0 Kudos

Thanks Immanuel!

Former Member
0 Kudos

Hi Immanuel,

I am trying to carry over fields from a UDO to a project.

In the 'Created' target of the Project lifecycle event, a getDocumentLinkList() returns no document links even though the project is created out of the UDO and has the UDO in the document links table in the UI.

Your input here is highly appreciated.

Thanks & Regards,

Subhasini