Get Id in BatchQuery

Hello community!!

I need construct a batchquery but in one column is necesary constuct a string with the id of the object. How can call the id object in the insert?

 

var insert = Ext.create("Terrasoft.InsertQuery", {
		                        rootSchemaName: "Entity"
			                    });
insert.setParameterValue("EmailURL", "?entityid=" + //Need put the Id of object Entity//, this.Terrasoft.DataValueType.TEXT);
 
bq.add(insert);

 

Like 0

Like

2 comments

Dear Federico,

In order to use the Id of the entity you created, you need to specify this ID before creation.

You can generate new Id by using Terrasoft.generateGUID() method:

var newGuid = Terrasoft.generateGUID();
var insert = Ext.create("Terrasoft.InsertQuery", {
   rootSchemaName: "Entity"
});
insert.setParameterValue("Id", newGuid, Terrasoft.DataValueType.GUID);
insert.setParameterValue("EmailURL", "?entityid=" + newGuid, this.Terrasoft.DataValueType.TEXT);
 
bq.add(insert);

Regards,

Anastasia

Anastasia Botezat,

 



Is there a way to do Terrasoft.generateGUID(); in server side web service?

 

 

Show all comments