My Assignment Widget Not Opening Smart View Form Step

Vinesh Bhatt
Vinesh Bhatt Member
edited December 31, 2020 in Smart View #1

Hello,

We have a requirement to show the Wokflow Assignments in an external application as a widget. For this purpose we had used the AssignmentsView package from the CSUI documentation.

As per the documentation its supposed to open the Smart View form onClick of any of the assigment if its enabled in the Workflow. But seems no action is being triggered in our case. I dont see any console errors as well for this.

Below is the code used.

 csui.require.config({

   config: {

    'csui/utils/contexts/factories/connector': {

     connection: {

            url: '<serverUrl>/api/v1',

      supportPath: '<supportpath>',

      session: {

       ticket: '[LL_REPTAG_OTCSTICKET /]'

      }

     }

    }

   }

  });

  

  csui.require(["csui/lib/marionette", "csui/utils/contexts/page/page.context",

   "csui/widgets/myassignments/myassignments.view"

  ], function (Marionette, PageContext, MyAssignmentsView) {


   var contentRegion = new Marionette.Region({

      el: "#content"

     }),

     pageContext = new PageContext(), // holds the model

     myAssignmentsView = new MyAssignmentsView({context: pageContext});

   contentRegion.show(myAssignmentsView);

   pageContext.fetch();


  });

  </script>

 </head>

 <body class="binf-widgets">

  <div class="binf-container-fluid grid-rows">

   <div class="binf-row">

    <div

     class="binf-col-sm-5 binf-col-md-6 binf-col-lg-12"

     id="content"

    ></div>

   </div>

  </div>

 </body>



Has anyone have any idea on this.

Tagged:

Comments

  • Karen Weir
    Karen Weir E Community Administrator

    @Vinesh Bhatt , have you been able to figure this out on your own or is this still open for discussion?

  • @Karen Weir No but I did found some handler for this event in the documentation. But I am not sure whtether I should modiy the event handler .


     var contentRegion = new Marionette.Region({

          el: "#content"

         }),

         pageContext = new PageContext(), // holds the model

         myAssignmentsView = new MyAssignmentsView({context: pageContext});


       // // provide a reaction to clicks on the mocked items

        myAssignmentsView.onClickItem = function (target) {   

    var node=target.model;

     alert('"' + target.model.attributes.name + '" of type ' + target.model.attributes.type + ' was clicked');

        

    };

        

    Do suggeest me if this is the way to go to achieve this.

  • Karen Weir
    Karen Weir E Community Administrator

    If the community members don't offer what you need, perhaps consider opening a ticket to work directly with our Support team.