Why is the layout not rendering even though the rule set is correct?

Here's what you do if you need to view the Work Order page based on the Work Order's completed status and the page layout isn't rendering correctly:

Prerequisite step:

  1. Verify in GET customerWorkOrders/<WONumber> has “EditModeFlag”: "false" > To enable Detail Work order page (layout contains read only fields) & “EditModeFlag”: "true" > To enable Edit Work order page (layout contains edit fields).

    Uptake steps for Detail work order page (Read only fields):

  2. Navigate to “DetailViewLayout” and duplicate layout “Oracle Field Service Cloud” for Field service work order or “Standard work order” for Generic work order.
  3. Apply rule set:
    • if $fields.WoStatusCdvalue() strictly equals 'ORA_SVC_WO_SUBMITTED'
    • return Oracle_Field_Service_Cloud_Detail_Page
    The generated code should look like the following:
    
    "addLayouts": {
        "Oracle_Field_Service_Cloud_Detail_Page": {
     
          "expression": "{{ $fields.WoStatusCd.value() === 'ORA_SVC_WO_SUBMITTED' ? 'Oracle_Field_Service_Cloud_Detail_Page' : null }}"
        }
    

    Make sure the detail section has the layout mapped correctly. If any other layout is referred, check the rule set section.

    
    "chainRules": {   
    "/detailViewLayout": {
          "rules": [
            "Oracle_Field_Service_Cloud_Detail_Page"
          ]
        }
    }
  4. Drill down into the duplicate layout. For example, “Oracle_Field_Service_Cloud_Detail_Page”.
  5. Add “WoStatusCd” field from the field section to the layout and map the field into “Dummy” template which doesn’t have any code look like “<template id="dummy"> </template>”
  6. To get the values in runtime, run the application to see the changes.