I have this Script Task code for receiving file name from opportunity files record:
string RecordIdParam = Get("RecordID");
var result = "";
// Creating a query to the "OpportunityFile" schema, adding the "Name" column to the query.
var esqResult = new EntitySchemaQuery(UserConnection.EntitySchemaManager, "OpportunityFile");
var colName = esqResult.AddColumn("Name");
// Executing query to the database and receiving the object with the specified identifier.
var entity = esqResult.GetEntity(UserConnection, new Guid(RecordIdParam));
// Receiving value of the object column.
result += entity.GetColumnValue(colName.Name).ToString();
Set("fileName", result);
return true;
I need to receive, in addition to the file name, the content of the blob to a binary variable for further use.
Can you please tell me what are the lines of code for this ?