How to create guid?

0
I want get new guid,But I don’t konw how to create guid?
asked
2 answers
2

Hello,

Create a  java action (no parameters, and return a string)

 

import java.util.UUID;

@Override

public java.lang.String executeAction() throws Exception

{

        // BEGIN USER CODE

UUID uuid = UUID.randomUUID();

return uuid.toString();

        // END USER CODE

}

 

or

 

You can use the ‘Random Hash’ Java action from the Community Commons module. 
 

 

Hope it helps!

 

 

answered
2

Hey Wenkang,

 

I'd check out the Community Commons module in the marketplace. It has a few different pre built options for you if you're looking to create a GUID, specifically in the String directory.

 

Hope this helps,

Austin

answered