Hi, I would want to ask how can I use the related fields (record relationship fields) in a process model. Now I´m passing a null value
The relation appears in the "Write Record Inputs"
And these are the outputs:
Then, I have a XOR to put conditions to the related fields, but I think I´m not passing the values well because the logic is not working.
Discussion posts and replies are publicly visible
Yes, this is somewhat of a limitation.
I would recommend reloading the full object graph via a query on the output of your Write Records node.
thanks for the information! Could you explain me how to that in a more detailed way, or refer me to some tutorial?
I suppose I have to write the refresh/reload query here:
And which record should be the target? My initial record?
Thank you so much
Yes, that is the correct area. Initial record query that includes the related record fields.
and which is the expression structure? a!queryRecordType() ???
Yes.
I could not solve the problem, with my query expression an error called "rank" appeared. probably there are some errors:
= a!queryRecordType( recordType: 'recordType!{51d44df6-c727-4443-8114-aef8a7509b41}CPF Maestro Facturas', fields: { 'recordType!{51d44df6-c727-4443-8114-aef8a7509b41}CPF Maestro Facturas.relationships.{42ee17b1-73d1-4012-b242-1356c590c856}cpfMaestroPedidos.fields.{7309402c-2312-4a4e-bdaa-5654789bffb2}idPedido' }, pagingInfo: a!pagingInfo(startIndex: 1, batchSize: 1), filters: a!queryFilter( field: 'recordType!{51d44df6-c727-4443-8114-aef8a7509b41}CPF Maestro Facturas.relationships.{42ee17b1-73d1-4012-b242-1356c590c856}cpfMaestroPedidos.fields.{7309402c-2312-4a4e-bdaa-5654789bffb2}idPedido', operator: "=", value: pv!recordFact['recordType!{51d44df6-c727-4443-8114-aef8a7509b41}CPF Maestro Facturas.fields.{e8009662-ca1c-43da-9c72-2840463214be}id_pedido'] ) ).data['recordType!{51d44df6-c727-4443-8114-aef8a7509b41}CPF Maestro Facturas.relationships.{42ee17b1-73d1-4012-b242-1356c590c856}cpfMaestroPedidos.fields.{7309402c-2312-4a4e-bdaa-5654789bffb2}idPedido']
Is there any other way to solve the problem and pass the relationship values in a correct way to the process model?
I have to admit that perhaps the copy pasting of record types could be improved. That is hard to read
I would suggest either referring to whatever original query you had somewhere in your process model.
The only alternative would be to create a custom record field and have your XOR process that.
I uploaded a pic of the code. On the other hand, is it possible to add a custom record of a related field?
How can I do this step by step? It says that I must use a custom record field function
Not sure what's wrong with your query. Looks fine from what I can see. What is the error?
For the custom record field, you can use a customFieldDefaultValue to access the related record field.