cancel
Showing results for 
Search instead for 
Did you mean: 

Apex trigger issues trying to add functionality to ServiceMax objects

Highlighted
Grill Chef
Grill Chef

Apex trigger issues trying to add functionality to ServiceMax objects

I am working with a developer that offers an app that lets you select files attached to a Case or Account (Salesforce functionality) to be downloaded to a Zip file.  I am working with their engineering team because I cannot add the same functionality to ServiceMax objects which include Work/Service Orders and Installed Products.

Can you provide provide us the Test Coverage for their Existing Code, I have listed Trigger and Classes names below for which we need them to write Test Classes with at least 75% code

coverage -

Trigger -


    SVMX_WorkDetail_Trgr



Apex class names -- Test Failures


PS_ServiceReport_UT

ServiceMaxMassDataEdit

PS_ServiceReport_UT

SVMX_VF_Open_Work_Orders_UT

SVMX_VF_ServiceQuoteFromEstimates_UT

SVMX_Work_Order_UT

SVMX_Work_OrderNLines_UT

Where all the classes due to which we are facing issues which are written by some other developers (in this case ServiceMax).



For those classes you need to write Test Class which will provide at least 75% Code coverage.

I appreciate any feedback...thanks

Message 1 of 3

 

Post a Comment

This widget could not be displayed.
" />
This widget could not be displayed.
" />
2 Replies

Re: Apex trigger issues trying to add functionality to ServiceMax objects

Hi Kate,

I'm not exactly sure which step is causing you problems, but it sounds like it could be a complicated task. I'll post some resources I've found and maybe it will lead you to a solution.

First, you should be able to query for attached files as they are represented by the Attachment class.

SOAP API Developer's Guide

List<Attachment> attachments = [SELECT Id, Name FROM Attachment WHERE ParentId = :workOrder.Id];

As for compression, I'm not aware of a pure apex solution. It seems some people have had success by creating a Visualforce page that does client-side compression.

Handling Office Files and Zip Files in Apex – Part 1 | Andy in the Cloud

There also seems to be some AppExchange utilities that might help you.

» bZip: The App Valnavjo's blog

» Compressing files in Salesforce Valnavjo's blog

Hope some of that helps.

Garrett

Message 2 of 3
Grill Chef
Grill Chef

Re: Apex trigger issues trying to add functionality to ServiceMax objects

Thanks for your assistance Garret...I have forwarded you ideas to my developer.  I have been on another project for a while but I appreciate the speedy feedback.

Message 3 of 3
This widget could not be displayed.
" />
This widget could not be displayed.
" />