Anyone aware of better FreeMarker documentation? W...
# administration
b
Anyone aware of better FreeMarker documentation? What I've found is incomplete. Specifically, I am working on Customer Center Access Email template trying to determine if the associated customer has an assigned website. I don't find it using the field dropdowns on the template editor though that's happened before. The standard template has references to an
access
record but I can't find a list of it's fields/properties. I'm wondering if that might help.
b
Thanks for the link. What I really need is what NetSuite data is exposed to FreeMarker. The NS help says record data should follow the Records Catalog. I can't find a record with id "access" which is referenced in the template, for example. Another example is
entity.company.assignedwebsite
which returns an invalid field error even though assignedwebsite is a valid field for customer.
r
I thought they fixed it so
entity.company.assignedwebsite
would work, but historically double joins haven't always worked in many places in NS. Meaning
entity.company
and
company.assignedwebsite
should theoretically work, but the double join like you're doing might not. And just in general some fields aren't available to the PDF templates because of course they aren't. Worst case scenario, you could try to drop those values into custom fields, which should always show up. Unfortunately I'm not aware of any documentation that shows which fields are exposed in PDFs, Saved Searches, etc. It's a lot of trial and error.
b
I've been using the guess and check approach but hoped maybe there was a better option. I was concerned about the double join as well. I kind of think it might be a company vs customer scenario, another odd schema design that caused me issues in saved searches.
r
Could try subsidiary in place of company. I'm not sure if you're on NS OneWorld, but if you are, I think the Company record kind of gets pre-empted by the subsidiary ones.
c
If you go to the record in netsuite and add &xml=T you can list of all fields that are available. Typically all of those should be available in freemarker. If it's not available, you have to source the field into a custom field that will be available.
b
@RJMNS I was actually referring to the customer vs company views of the customer record that NetSuite exposes in different places. The "company" view is more restrictive with less fields even though it's the same record. It's always seemed odd.
@creece Checking the xml is a good idea. The customer record does show the field as I would expect. I've also verified that I can access other fields through the join, i.e.
entity.company.companyname
. It again seems the company join is not providing access to the full customer record. And I still haven't found a source for the access information.
Went a different direction and used a formula field in a contact search to check field ids/references. That showed a different id for the field than all other sources (field id, records catalog, page xml). Don't know why but I have found something that should work. Thanks for the ideas.