Field Service

Get Involved. Join the Conversation.

Topic

    Antero Makinen
    Reset fields when activity starts
    Topic posted November 23, 2018 by Antero MakinenBlue Ribbon: 750+ Points, tagged Configuration, Mobility / Mobile Apps 
    65 Views, 7 Comments
    Title:
    Reset fields when activity starts
    Summary:
    Reset fields after starting activity which was suspended before
    Content:

    Hey everyone,

    We have a safety form that must be filled by technicians in Mobility in the beginning of every activity. But the issue is, that the form is already filled in activities that have been suspended before and then started again, because suspending makes a copy of the previous activity and that's why it remembers the information in the fields.

    Is there a way to reset these fields every time an activity is started? Or any way to reset fields after some action happens, so we would have empty safety form each time?

    Thanks,

    Antero

    Version:
    18C

    Comment

     

    • shankar

      Hi Antero, I don't think it is possible as there should be an option in OFSC to before update trigger to be enabled for developers. The simplest solution which I can suggest is to use subscriptions. When you subscribe to activity suspended and activity create, you would get both the suspended and new activity id along with master activity id. you can then do an update on the pending activity where you set the values to the ones which you need in your business scenarios. Likewise if you aren't using a middleware then you need to create a plugin which does this for you on a click of a button but the earlier process needs zero user interaction.

      • Antero Makinen

        Okay, thanks for your answer! Good to know that there are at least some solutions to this. How hard is it to do these subscriptions? Do they need REST API? I tried to find information about subscriptions from the 18C instructions and many of them were related to REST. 

        • shankar

          Subscriptions are extremely easy and can be created via a simple curl and it is used wrt integration so you could ask your middleware team to write the curl on postman and generate the required subscription based on your need. Lastly subscriptions work only on REST to my knowledge.

    • Hardik Gupta

      Hi Antero,

       

      If you don't have too many fields then you can try Message Scenarios.

      There is an event for activity suspend. You can use that and you can create separate steps for every field. 

      EX:

      You can put the subject as "xa_value1" and the body as empty. Nothing in the body. So it will replace the existing value with a blank value. It will save integration effort.

      But caution: Use it only if there are a few fields that need a reset. As for every field you will need to create a Message Step.

      More Info : https://docs.oracle.com/en/cloud/saas/field-service/18d/famsc/message-scenario-configuration-guide.pdf

       

      Regards,

      Hardik

    • Antero Makinen

      Hi, 

      I'm still looking for a solution to this... Is it possible to clear enumeration property via message scenario? And the only option in my case is that it should get cleared when activity is started. 

      • Zsolt Tolgyesi

        Hi Antero,

        If both proposed solutions are failed then you may need to look for Oracle's help.

        IMO this is not possible. Maybe the best workaround is to disable activity suspending at system level.

        Regards,
        Zsolt