Articles → UiPath → Invoke Code Activity In Uipath

Invoke Code Activity In Uipath






Purpose





Example




  1. Drag and drop the "Invoke Code" activity
  2. Click on the "Edit Arguments" button of the "Invoke Code" activity
  3. A pop-up window will appear to create an argument. For this example, we will create an argument "Test"
  4. Picture showing the Test variable inside the Variables window
    Click to Enlarge

  5. Click on the "Edit Code" button to write the C# code. In this window, we will write the following C# code
  6. Picture showing the Edit Code window inside the Invoke code activity
    Click to Enlarge

  7. In the properties window of the "Invoke Code" activity, specify the language as "CSharp"
  8. Picture showing properties window of the invoke code activity to specify the language
    Click to Enlarge

  9. Save and run the bot

Output




Picture showing the text file created using the invoke code activity
Click to Enlarge


Posted By  -  Karan Gupta
 
Posted On  -  Wednesday, February 10, 2021

Query/Feedback


Your Email Id
 
Subject
 
Query/FeedbackCharacters remaining 250