This topic contains 6 replies, has 0 voices, and was last updated by MarkZSSI 8 years, 1 month ago.
-
AuthorPosts
-
September 26, 2016 at 10:39 am #2315
MarkZSSII have a packing slip where I want to include another XML file into the final output. XML Include and XML XInclude don’t seem to getting the results done.
This code here works fine, but I have around ~45 packing slips, and it really isn’t optimal to have to make ~45 changes everytime a box type changes.
Code:
BOX XXXXX
#if>
BOX YYYYY
#if>
Packing Slip
Date: ${record.trandate}
The above works to put a box type code on the packing slip.I tried this, and it doesn’t work:
Code:
Packing Slip
Date: ${record.trandate}
Any ideas how I can include another XML file inside an XML packing slip?
This is a cached copy. Click here to see the original post. -
September 26, 2016 at 10:59 pm #2316
chanarbonHi @MarkZSSI,
I am not pretty sure whether this could be achieved by simple customization but I think this could be achieved using scripting. What you could do is to perform a convert the templates into string, concatenate the strings and convert back to XML document then perform the printing. The mentioned method is pretty much easy because the step 1 and step 3 are available in XML APIs for SuiteScript 1.0 or xml module in 2.0. The last action which is printing is in Record APIs in SuiteScript 1.0 and render module in SuiteScript 2.0
-
September 27, 2016 at 7:02 pm #2317
michoelYou can use the Freemarker “#include” directive to achieve this.
-
September 28, 2016 at 9:22 am #2318
MarkZSSIThanks for responding to this!
1. chanarbon – this sounds like a confusing way to do something that should be really simple.
2. michoel – I might give that a try.
Update: I did solve this by creating a custom field and setting up a workflow. But option #2 seems worth testing, as I don’t want to have to add a custom field unless it’s absolutely the only way to do this.
-
September 28, 2016 at 9:40 am #2319
MarkZSSImichoel – #include doesn’t work. Thanks, but I think I’ll just stick with what does work. Custom field and workflow.
-
September 28, 2016 at 5:36 pm #2320
michoelOriginally posted by MarkZSSI
View Post
michoel – #include doesn’t work. Thanks, but I think I’ll just stick with what does work. Custom field and workflow.
It certainly does it, I use it in every one of my templates. Make sure that the URL you are using is an absolute path, and if you are hosting the file in your NS File Cabinet it is ‘Available Without Login’.
-
October 4, 2016 at 8:15 am #2321
MarkZSSIOriginally posted by michoel
View Post
It certainly does it, I use it in every one of my templates. Make sure that the URL you are using is an absolute path, and if you are hosting the file in your NS File Cabinet it is ‘Available Without Login’.
I tried different ways to access the file. It didn’t work. No worries, as I have other projects and as long as something works, I can move on to the next business need. Hopefully in the future I’ll get to have more time to work on #include and see if I can get it to work.
I do appreciate the response!
-
AuthorPosts
You must be logged in to reply to this topic.