Having an issue trying to customise an existing pa...
# sdf
d
Having an issue trying to customise an existing packingslip advanced pdf/html template. It seems the template was created a long while ago. On the xml definition the "standard" attribute of the root "advancedpdftemplate" node is
OLDSTDTMPLPACKINGSLIP
. If I were to create the custom template today it would be
STDTMPLPACKINGSLIP
. There's a fun endless loop of errors when you try to validate or deploy the project.... More in the thread
When you try to validate, deploy (or --dryrun) you get this error:
Copy code
An error occured during validation of Custom Objects against the account (custtmpl_packingslip)
Details: You must enable the following features to use the advancedpdftemplate with the custtmpl_packingslip ID: SHOWOLDPACKINGSLIPTEMPLATE
File: ~/Objects/Templates/AdvancedPDFs/custtmpl_packingslip.xml
okay, weird. But fine, I'll add
SHOWOLDPACKINGSLIPTEMPLATE
feature to the manifest as a feature dependency Well, then you get this error:
Copy code
An error occurred during manifest validation.
Details: The SHOWOLDPACKINGSLIPTEMPLATE feature defined in the manifest does not exist.
File: ~/manifest.xml
huh.... okay weird, maybe I'm misinterpreting what this feature is? Let's just try changing the templates xml definition from:
<advancedpdftemplate scriptid="custtmpl_packingslip" standard="OLDSTDTMPLPACKINGSLIP">
To:
<advancedpdftemplate scriptid="custtmpl_packingslip" standard="STDTMPLPACKINGSLIP">
Nope, then you get this error:
Copy code
An error occured during validation of Custom Objects against the account (custtmpl_packingslip)
Details: The standard attribute value, OLDSTDTMPLPACKINGSLIP, cannot be modified.
File: ~/Objects/Templates/AdvancedPDFs/custtmpl_packingslip.xml
I presume the standard packing slip template was depreciated and replaced with a new one, but
OLDSTDTMPLPACKINGSLIP
doesn't even exist anymore in the list of PDF templates (even as an inactive one).
I presume I'm forced to either make the changes in the UI, or replace the template with a new one and update all the references to it (hopefully only on transaction forms 🤞)
a
you probably don't need to update the references, once you have the new one, change the id of the old one, and then rename your new one to old id id and script id
👀 1
cheers 1
that's a weird issue 👍
d
ofc, that's definitely the way to do it 🤦 and thanks, thought I was going crazy
a
it happens 😉