on 04-13-2016 1:23 PM
Hi All,
I am not able to fetch the name of an Extension Field which is in Company object. I am able to get the value with below code.
compRef = doc.getCompanyRef();
compHome = IBeanHomeLocator.lookup(session, compRef);
comp = compHome.find(compRef);
PriceIfc smallValuePrice=comp.getExtensionField("EXT_SMALL_VALUE").get();
but I need to get the name of the Extension Field. Can you please help me to get it.
Thanks,
Naresh.
Hi Bogdan,
Thanks for the reply.
There are three extension fields in company object. I need to give an error message as chain exception saying that "XXX, YYY, ZZZ fields are empty" if they are empty. For that I need to fetch field name and use it in displaying my error message.
Thanks,
Naresh.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Unfortunately you'll not be able to do that.
Only alternative is to show an exception message next to each field and a generic message at the header-level (this last part is done automatically btw):
ae = new ApplicationException(session);
ae.chainAtEnd(doc.createApplicationException("FIELD_1" ...
ae.chainAtEnd(doc.createApplicationException("FIELD_2" ...
ae.chainAtEnd(doc.createApplicationException("FIELD_3" ...
if (ae.getChain() != null)
throw ae.getChain();
Hi Naresh,
Can you detail why you need to fetch the name of the extension field?
Technically, you will not be able to fetch it, because the name is only bound to the UI, not the backend.
Additionally, the name itself is not defined system-wide. You could change it via PageCustomization and make it different for every document, so even fetching from ExtensionDefinition will not be a valid approach.
Bogdan
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.