on 02-10-2010 4:33 AM
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..
Hi Immanuel,
we have a similar requirement. Have you been able to figure this out?
regards
Sub
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
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);
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.