Thank you for your feedback.
Form temporarily unavailable. Please try again or contact to submit your comments.

Customize the data retrieval script include in scoped HR

Log in to subscribe to topics and get notified when content changes.

Customize the data retrieval script include in scoped HR

You can modify the default script includes to get additional data from Workday, in the scoped version of HR.

Before you begin

Role required: admin


  1. Navigate to Integration-Workday > Script Includes.
  2. Open the workday_Factory script.
  3. Modify the script as necessary. Use any of the following examples.

    The following customization of the workday_Factory script calls the newly created cust_workday_worker_retriever class.

      var overridenWrapperType = workday_Factory.registeredClassesInternal[scriptName];
        return overridenWrapperType;
          case workday.WORKER_RETRIEVER:
            return cust_workday_worker_retriever; // This is the name of the new script include that extends workday_worker_retriever;
            return workday_BaseFactory.getWrapperType(scriptName);

    The following example is a customized version of the worker_retriever script named cust_workday_worker_retriever. In this example, the createUser function and the getUserName functions are customized. The createUser function sets the company value to a specific sys_id. The getUserName function returns a trimmed version of the source user name. The first name and the last name with a period (.) between them, such as john.doe displays.

    var cust_workday_worker_retriever =Class.create();
    cust_workday_worker_retriever.prototype= Object.extendsObject(workday_worker_retriever,{
      createUser:function(source, userName){var destRec =, source, userName);
          return destRec;}},
      getUserName:function(source){return source.u_wd_pref_first_name.trim()+'.'+ source.u_wd_pref_last_name.trim();},