cancel
Showing results for 
Search instead for 
Did you mean: 

Script to get the value

Former Member
0 Kudos

Hello Experts,

I am creating a toolbar script to get the values from an aggrement page and generate a csv file. When I use this methods it is returing a value of (Database Column:Value) we want to retrieve the value only (Database Column should be suppressed). Follwoing is the script and the output it is generating.

agreementBean = doc.getRootParentIBean();

lineItemCollection = agreementBean.getLineItems();

//lineitem bean at index 0

collectionbean = lineItemCollection.get(0);

FIELDB = doc.getStatusRef() ;

ExtCategory = collectionbean.getExternalCatObjRef();

location = collectionbean.getLocationObjRef();

FIELDB = FIELDB ","ExtCategory;

FIELDB = FIELDB ","location;

//WRITING IT TO A FILE

OUTPUT :

2147483427:616:Negotiations

2147482944:602:Goods and Services

2147483532:610:Mumbai office

Any suggestions on how to get the value only and not the Data Base Column Name?

Regards

ABaral

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

FIELDB = FIELDB.getDisplayName() ","ExtCategory.getDisplayName();

FIELDB = FIELDB ","location.getDisplayName();

This should work.

Regards,

Immanuel

Former Member
0 Kudos

Thanks Immanuel it was really helpful. I am now struggling to get the value of a referenced object from master aggrement Page.

I want to get the Vendor External_ID from vendor name which is getting displayed in Supplier tab of Master aggrement page.

doc.getVendorRef()

doc.createApplicationException(null,""+doc.getVendorRef());

with the above code I am getting the vendor name but we want to get the Vendor External Id. Any suggestions on how to retrieve this value?

Thanks in Advance.

Regards

ABaral

Former Member
0 Kudos

import com.frictionless.api.doccommon.masterdata.VendorIBeanHomeIfc;

vendorObj=doc.getVendorRef();

VendorHome=IBeanHomeLocator.lookup(session,VendorIBeanHomeIfc.sHOME_NAME);

vendorBean=VendorHome.find(vendorObj);

throw doc.createApplicationException(null,vendorBean.getExternalId());

Hope this helps,

Regards,

Immanuel

Answers (0)