Thank you for supporting the Cloud Customer Connect Community in 2024. It's a gift to work with you!

Look back
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?

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!