I would like to know how to configure Custom Action to Invoke PM engine from PM plan wizards. Any one has any idea on which class & method needs to be used and required parameters?
We would like to enable this feature so that as soon as PM plan is active, users can generate PM WOs without waiting PM engine job to run.
Any inputs greatly appreciated.
As far as I am aware, there is no such option. We did get some code to run during testing to fire the PM engine but stopped doing that since we had issues. I know our org is far from default though.
The solution we use today is have a PM Process scheduled to run every evening for PM Plans that meet the criteria but also have "emergency" in their name. That way the PM Work Orders and Case are created without waiting for the normal PM Process schedule. Would that be an option for you? In addition these users are subscribed to a report that flags these PM Plans that have emergency in the name, so they don't forget to remove that from the name the next day :-)
Thank you for quick reply. We do run daily job for all PM plan. We would like to give more control to users to generate PM work order. If you could share us the script that you used and know issues then I will explore further and share my findings.
I'm a business user (admin) and this "script" was provided by ServiceMax to our IT. This is some 4 years ago and as far as I know we don't have it anymore, but Michael Majerus or someone else in ServiceMax support may be able to provide it. Maybe the easiest way is just to log a ticket with support...
Not sure if this still works as it was from 2013, but feel free to try and share your experiences!
Open developer console and run the following code to run the PM process and generate the work orders
String StrSVMXProcessID = 'Test_PM_Process'; // ServiceMax Process ID
String StrSFPMProcessID = [Select Id From SVMXC__ServiceMax_Processes__c where SVMXC__ProcessID__c =: StrSVMXProcessID AND SVMXC__Active__c = true].Id;
SVMXC.PREV_Engine_Batch EngObj = new SVMXC.PREV_Engine_Batch(); EngObj.setProcessIds.add(StrSFPMProcessID);
ID Batch = database.executebatch(EngObj, 1);
Michael Majerus doesn’t work for SeeviceMax, he is a customer, just like you all! I know he’s super active, supportive and helpful in this community, in fact, he’s leading the West Coast user group next month West Coast User Groupat Maximize. I’m sure he’ll be happy to weigh in if he has experience in this.
Hi Sandeep Reddy Musku,
during our implementation our SVMX Consultant created an SFM Custom Action (Action Type URL) which points to the following address:
We then added this SFM to the PM Plan Wizards, so that the scheduling team can select the appropriate PM Plan Process to run when they need Work Orders generating asap rather than waiting for the overnight scheduled runs.
I'm not sure if the code is OOTB or had been added specifically for us though.
I am looking for same configuration. This is not available out of the box can be configured. I can't access Custom Action URL you shared. Can you share screenshot or configuration details of this Custom Action? I need to know the class and method to invoke and parameters to pass. I have raised a case with SVMX support and awaiting for the same steps.