CrewPlanningEditor Custom Editor Setup

To make adding or editing crew planning records easier, you can use the CrewPlanningEditor.

The CrewPlanningEditor changes how lookups work on the Crew Planning tab as follows.

How the CrewPlanningEditor Works

You can use the Crew Member Lookup and the Role on Job Lookup.

Crew Member Lookup

Setting Value Impact

Lookup Filter

{!FXNamespace}Available_for_Field_Work__c=true AND ({!FXNamespace}Office__c=NULL OR {!FXNamespace}Office__c='{!CurrentUserContactOffice}')

Impact: Limits the list of contacts to show only those who:

  1. Have Available for Field Work selected in their Contact record and

  2. Do not have an Office assigned or are assigned to the same Office as the current user.

Fields for Available Records

Id, Name, Office, Available for Field Work, Job Title from Catalog, Email, Business Phone

The listed fields display for contacts in search results.

Fields Analyzed for Keyword Searches

Name, Email, Business Phone

Keyword searches analyze the name, email address, and phone number of contacts.

Sort Order of Available Records

Name

Contacts sort in alphabetical order by name.

Role on Job Lookup

Setting Value Impact

Lookup Filter

{!FXNamespace}Ticket_Item_Record_Type__c='Labor' AND {!FXNamespace}Price_Book__c='@@{!FXNamespace}Job__c.{!FXNamespace}Price_Book__c@@'

Impact: Only labor items from the job’s price book display available for selection.

Fields for Available Records

Id, Name, Catalog Item Code, Catalog Description

The listed fields display for price book items in search results.

Fields Analyzed for Keyword Searches

Catalog Description, Catalog Item Code

Keyword searches analyze the description and item code of price book items.

Sort Order of Available Records

Catalog Item Code

Price book items sort numerical order by item code.

Switch to Use in Salesforce Classic

Configure the CrewPlanningEditor

  1. From Setup, enter object in the Quick Find box.

  2. Click Crew Planning.

  3. Under Buttons, Links, and Actions, click Edit for these columns:

    Action Clone row Edit row New row

    In the Override With, select

    VisualforcePage

    Select

    CrewPlanningEditor

    1. Click Save.

  4. Continue with Add a RESTEndPoint Remote Site Setting.

Add a RESTEndPoint Remote Site Setting

  1. Open the Crew Planning tab.

  2. Open a crew planning record.

  3. Click Edit.

  4. Copy the domain listed in the error message.

    Example 1. Sample domain name to copy

    Use your customized my domain URL that is specific to your org instead of your instance specific URL. You can find your my domain here.

    Don’t use instanced URLs when logging in to Salesforce with code or as a user. When your org is moved to another Salesforce instance, code using the instanced URL breaks. If you find instanced URLs in your code, replace them with your My Domain login URL or the default Salesforce login URL. See Log In to Salesforce with Code for more information.

  5. From Setup, enter remote in the Quick Find box, then select Remote Site Settings.

  6. Click New Remote Site.

  7. In Remote Site Name, enter RESTEndpoint.

  8. In Remote Site URL, enter the domain you copied before.

    The Remote Site URL field is case-sensitive so make sure the URL you enter uses the correct capitalization.

  9. Click Active.

  10. Click Save.

  11. Continue on with Grant Permission to the CrewPlanningEditor.

Grant Permission to the CrewPlanningEditor

  1. From Setup, enter permission in the Quick Find box, then select Permission Sets.

  2. Open a permission set for Visualforce pages.

  3. Under Apps, click Visualforce Page Access.

  4. Click Edit.

  5. Add "FX5.CrewPlanningEditor" to Enabled Visualforce Pages.

  6. Click Save.

  7. Repeat these steps for other permission sets as needed.

Switch to Use in Salesforce Lightning

Configure the CrewPlanningEditor

  1. From Setup, enter object in the Quick Find box.

  2. Select Object Manager under Objects and Fields.

  3. In the Object Manager, enter Crew in the Quick Find field.

  4. Click Crew Planning.

  5. Under Buttons, Links, and Actions,

    Features CrewPlanning Clone Edit Selection
    Action Clone row Edit row New row

    In the Override With, select

    VisualforcePage

    Select

    CrewPlanningEditor (FX5__CrewPlanningEditor)

    • Click Save.

  6. Continue with Add a RESTEndPoint Remote Site Setting.

Add a RESTEndPoint Remote Site Setting

  1. Open the Crew Planning tab.

  2. Open a crew planning record.

  3. Click Edit.

  4. Copy the domain listed in the error message.

    Example 2. Sample domain name to copy

    Use your customized my domain URL that is specific to your org instead of your instance specific URL. You can find your my domain here.

    Don’t use instanced URLs when logging in to Salesforce with code or as a user. When your org is moved to another Salesforce instance, code using the instanced URL breaks. If you find instanced URLs in your code, replace them with your My Domain login URL or the default Salesforce login URL. See Log In to Salesforce with Code for more information.

  5. From Setup, enter remote in the Quick Find box, then select Remote Site Settings.

  6. Click New Remote Site.

  7. In Remote Site Name, enter RESTEndpoint.

  8. In Remote Site URL, enter the domain you had copied from the error message.

    The Remote Site URL field is case-sensitive so make sure the URL you enter uses the correct capitalization.

  9. Click Active.

  10. Click Save.

  11. Continue with Grant permission to the CrewPlanningEditor.

Grant permission to the CrewPlanningEditor

  1. From Setup, enter permission in the Quick Find box, then select Permission Sets.

  2. Open a permission set for Visualforce pages.

  3. Under Apps, click Visualforce Page Access.

  4. Click Edit.

  5. Add "FX5.CrewPlanningEditor" to Enabled Visualforce Pages.

  6. Click Save.

  7. Repeat these steps for other permission sets as needed.

Setup Other Custom Editors (if needed)