Important Update: Archer Community Scheduled Maintenance on November 23–24 - New Community Launching Soon! Learn More..
2024-11-15 06:52 AM
I am facing issue in copying related record field value into Cross reference using API.
data.Content.FieldContents[fid_Target_Review_Application] = {
"Type": 9,
"Tag": "Review Application",
"Value":[{"ContentId": Number(productregisterfieldArray[135][5]),"LevelId":xxx}],
"FieldId": fid_Target_Review_Application
},
after converting into JSON showing NAN error for this field.
tried below version as well but unable to set the records in target field
data.Content.FieldContents[fid_Target_Review_Application] = {
"Type": 9,
"Tag": "Review Application",
"Value": productregisterfieldArray[135][5],
"FieldId": fid_Target_Review_Application
},
2024-11-15 09:14 AM
@_neha the JSON for populating a cross-reference needs to look like this:
"13907": {
"Type": 9,
"Tag": "My Contacts (Cross-Reference to Contacts)",
"Value": [
{
"ContentId": 205522
},
{
"ContentId": 318794
},
{
"ContentId": 325672
}
],
"FieldId": 13907
}
Advisory Consultant
2024-11-15 09:14 AM
@_neha the JSON for populating a cross-reference needs to look like this:
"13907": {
"Type": 9,
"Tag": "My Contacts (Cross-Reference to Contacts)",
"Value": [
{
"ContentId": 205522
},
{
"ContentId": 318794
},
{
"ContentId": 325672
}
],
"FieldId": 13907
}
Advisory Consultant
2024-11-15 09:36 AM
Hi @DavidPetty
here there will we be more than one number(not fixed) of related records in productregisterfieldArray[135][5] this array.
data.Content.FieldContents[fid_Target_Review_Application] = {
"Type": 9,
"Tag": "Review Application",
"Value": [
{"ContentId": productregisterfieldArray[135][5]},
],
"FieldId": fid_Target_Review_Application
},
I tried it this way but still not working. how to separate it in value section.
2024-11-15 11:06 AM - edited 2024-11-15 11:06 AM
I don't know what language you're writing in, but I suspect you'd have to loop through the productregisterfieldArray array and build the JSON for Value accordingly.
Advisory Consultant