compute00GExternalId
def compute00GExternalId = {ownerId, createdById = null ->
xxx
}
If the ownerId value starts with 00G (which means the owner is a queue) and if the workOrderId value is not null and the corresponding Job record exists on the Service Board side, returns the Owner field value of the current Job record, otherwise returns 'external-' and createdById.
If the ownerId value does not start with 00G and is not null, returns 'external-' and OwnerId.
In all other cases, returns null.
Example 1
"io_owner": "compute00GExternalId(fields.OwnerId, systemFields.CreatedById)"
Sample Transform 1
Original Fields
Transformed Fields
Name
Value
Name
Value
OwnerId
00G7F0000047ertPYU
io_owner
external-0057F000003LtrtQAC
CreatedById
0057F000003LtrtQAC
Example 2
"io_owner": "compute00GExternalId(fields.OwnerId, systemFields.CreatedById, criteria.Id)"
Sample Transform 2
Original Fields
Transformed Fields
Name
Value
Name and Value
Value
OwnerId
00G7F0000047ertPYU
Owner field in corresponding Job record and io_owner
8918c7cd-8857-48ec-afa3-c0718126b940
CreatedById
0057F000003LtrtQAC
criteria.Id
a1g2E000008OCEQQA4
For more information:
concat
escape
ifelse
Was this helpful?