You're almost there! Please answer a few more questions for access to the Applications content. Complete registration
Interested in joining? Complete your registration by providing Areas of Interest here. Register

NGS - How to autopopulate fields from rest call?

Received Response
34
Views
1
Comments
edited Feb 15, 2024 2:18PM in Fusion Service 1 comment

Summary:

We are creating debrief from workorder object.

when we click create debrief from work order it is defaulting some fields from work order.

for defaulting fields we have used on create event.


below code:


define([

  'vb/action/actionChain',

  'vb/action/actions',

  'vb/action/actionUtils',

], (

  ActionChain,

  Actions,

  ActionUtils

) => {

  'use strict';


  class onCreateCallbackChain extends ActionChain {


    /**

     * @param {Object} context

     * @param {Object} params

     * @param {{row:object,parentRow:object,mode:string}} params.event

     * @param {(previous: {row:object,child:object[],related:object[],deDuplicateConfig:object}) => void} params.done

     * @return {(previous: {row:object,child:object[],related:object[],deDuplicateConfig:object}) => void}

     */

    async run(context, { event, done }) {

      const { $layout, $extension, $responsive, $user } = context;

Howdy, Stranger!

Log In

To view full details, sign in.

Register

Don't have an account? Click here to get started!