Community Tip - Did you know you can set a signature that will be added to all your posts? Set it here! X
Version: Windchill 12.1
Use Case: I have one action on Details page action set of part and on click of that action I am creating one excel file with few custom data in windchill temp location. Now requirement is it should get downloaded on client UI on click of that custom action. So need help with line of code to download created file from particular location.
Description:
I have one action on Details page action set of part and on click of that action I am creating one excel file with few custom data in windchill temp location.
Now requirement is it should get downloaded on client UI on click of that custom action.
So need help with line of code to download created file from particular location.
FormResult result = new FormResult();
String filePath = "file path";
File file = new File(filePath);
URL localURL = NmObjectHelper.constructOutputURL(file, file.getName());
result.setForcedUrl(localURL.toString());
result.setURL(localURL.toString());
FeedbackMessage msg = new FeedbackMessage(FeedbackType.SUCCESS, Locale.CHINA, "Export Data", null, "Export Success");
result.addFeedbackMessage(msg);
result.setStatus(FormProcessingStatus.SUCCESS);
return result;
Hello @VK_11755221,
It looks like you have a response from a community member. If it helped to answer your question please mark the reply as the Accepted Solution.
Of course, if you have more to share on your issue, please let the Community know so other community members can continue to help you.
Thanks,
Vivek N.
Community Moderation Team.