Activities
latest
false
Classic Integrations Activities
Last updated Jul 17, 2024

Initialize Record

UiPath.OracleNetSuite.Activities.InitializeRecord

The Initialize Record activity uses the the NetSuite initialize operation to update a specific record (internalid).

After initializing the record, the activity outputs the new record of the initialization in a Record object (Record) that you can use in a subsequent activity. The status of the request and success/failure information will be set in a ResponseStatus object (NetSuiteStatus) that you can use in subsequent activities (e.g., conditional logic).

How it works

The following steps and message sequence diagram is an example of how the activity works from design time (i.e., the activity dependencies and input/output properties) to run time.

  1. Complete the Setup steps.
  2. Add the Oracle NetSuite Application Scope activity to your project.
  3. Add the Initialize Record activity inside the Oracle NetSuite Application Scope activity.
  4. Click the Configure button inside the Initialize Record activity. This allows you to set the input parameters.
  5. Select the Record Type of the record type you want the initialization to create.
  6. Select the Reference Type of the record type you want to initialize.
  7. Enter the Reference Id for the internalid of the reference record that will be initialized.
  8. Create and enter a Record variable that will contain the newly created record.
  9. Create and enter a ResponseStatus variable for the Output property.


In the Body of the Activity

To enter your Initialize Record property values, you must use the Input Dialog by clicking the Configure button.

  • RecordType - The record type to create and initialize.
  • ReferenceType - The record type from which to initialize the record.
  • ReferenceId (string) - The Id of the record from which to initialize.

Properties

Common
  • DisplayName - The display name of the activity. This field supports only Strings or String variables.
Misc
  • Private - If selected, the values of variables and arguments are no longer logged at Verbose level.
Output
  • Record - The initialized record as returned by NetSuite. Enter a Record variable (UiPath.OracleNetSuite.Com.netsuite.webservices.Record). The Record object is not saved by default but is the output of a the initialization transformation. Use the Insert Record activity to save this record with any additional fields that need to be set.
  • ResponseStatus - The status of the request (success/failure information). Enter a ResponseStatus variable (UiPath.BAF.Models.ResponseStatus). The ResponseStatus object includes three properties that you can use in other activities.
    • Success - Boolean - Specifies whether the API request was successful.
    • ErrorCode - String - The response error if the API request is unsuccessful (Success=False).
    • Message - String - The error message.

Example

After initializing the record, the Initialize Record activity outputs a new Record of the desired type in a new Record object (Record) which you can use in a subsequent activity such as the Insert Record activity.
A canonical example is to initialize a PurchaseOrder from an existing PurchaseRequisition. The steps to do this are:
  1. Insert a new PurchaseRequisition using the Insert Record activity if one does not already exist.
  2. Initialize the PurchaseRequisition Record in to a PurchaseOrder using the Initialize Record activity. The output of this activity is a new PurchaseOrder (Record).
  3. Before inserting the new PurchaseOrder Record you may need to use an Assign or Multi-Assign activity to set some of the required properties on the PurchaseOrder Record first.
  4. Insert the PurchaseOrder Record using an Insert Record activity.

The diagram is an example of how Initialize a CustomerPayment record from a Customer Record, update the necessary parameters, and then insert the CustomerPayment Record.



Each Record type (e.g. PurchaseOrder) that is created from an the Initialize Record activity will require a different set of parameters that will need to be set before it can be inserted via the Insert Record activity.

Two examples:

Initialize a CustomerPayment (Record) from a Customer
  1. Set the (appliedSpecified) property to false.
  2. Set the (pendingSpecified) property to false.
Initialize a PurchaseOrder (Record) from a PurchaseRequisition
  1. Set the (createdDateSpecified) property to false.
  2. Set the (lastModifiedDateSpecified) property to false.
  3. Set the (totalSpecified) property to false.
  • How it works
  • Properties
  • Example

Was this page helpful?

Get The Help You Need
Learning RPA - Automation Courses
UiPath Community Forum
Uipath Logo White
Trust and Security
© 2005-2024 UiPath. All rights reserved.