You need to sign in to do that
Don't have an account?
Anil_Singh
"Create Service Report" FSL
In Field Service Lightning (FSL) - Can I apply condition in "Create Service Report" button. I need this button to work based on condition.
When I click this button it generates a pdf view and save this Report in Related List of "Service Report."
Also can we have a custom code before this button is Clicked.
Thanks
Anil Singh
When I click this button it generates a pdf view and save this Report in Related List of "Service Report."
Also can we have a custom code before this button is Clicked.
Thanks
Anil Singh
But There are 3 ways to do it.
1. You can write before Insert trigger on Service Report Object and add your validations in the trigger using .adderror method.
2. I believe you would generate service report only once the work is completed. if yes - You can use two different record types. once the work is completed and all the validations are done, the user would set the status to 'Completed' which will flip the Record type to a X_completed. You can show the Create Service Report only in the pagelayout for the Completed Record type.
3. you can write whole new custom lightning component, use whatever custom logic needed and then genrate the Service Report from the component programatically. reference to generate service report from apex http://www.salesforceenthusiast.com/Pages/code9.php
The trigger is before and the code is as follows, but still not possible to different error message.