and more in a single search tool across platforms. Read the announcement here. |
02/14/2024 07:36 AM - last edited on 02/14/2024 10:09 PM by Sunil
Hi,
We are facing "JSON_PARSER_ERROR"}],"statusCode":400," issue in follwing JSON. Kindly lets us know if Task object and dynamic attribute is available in create JSON ?
{
"accountIdPath": "call1.message.id",
"call": [
{
"name": "call1",
"connection": "userAuth",
"url": "https://removed.sandbox.my.salesforce.com/services/data/v48.0/sobjects/Contact ",
"httpMethod": "POST",
"httpParams": "{\"FirstName\":\"${user?.getFirstname()}\",\"LastName\":\"${user?.getLastname()}\",\"HN_Contact_Type__c\":\"Dealer Contact\",\"Salutation\":\"${user?.getCustomproperty1()}\",\"Department\":\"${user?.getDepartmentname()}\",\"Email\":\"${user?.getEmail()}\",\"HN_Position__c\":\"${user?.getTitle()}\",\"MobilePhone\":\"${user?.getPhonenumber()}\",\"HN_Home_Phone__c\":\"${user.secondaryPhone}\",\"HN_TDTENO__c\":\"${task.source=='REQUEST'?requestAccessAttributes.get('techno'):user?.getUsername()}\",\"HN_ERP_ID__c\":\"${task.source=='REQUEST'?D_user?.getUsername():D_user?.getUsername()}'\",\"HN_Active__c\":true,\"AccountId\":\"${user.getCustomproperty6()==('33333')?'0011e00000lpMAFAA2':(user.getCustomproperty6()==('80630')?'0011e00000gFx7gAAC':(user.getCustomproperty6()==('80544')?'0011e00000cUQwIAAW':(user.getCustomproperty6()==('22550')?'0011e00000SqLVBAA3':(user.getCustomproperty6()==('80254')?'0011e00000S33CkAAJ':(user.getCustomproperty6()==('80250')?'0011e00000S33CjAAJ':(user.getCustomproperty6()==('80220')?'0011e00000S33CiAAJ':(user.getCustomproperty6()==('80266')?'0011e00000S33ChAAJ':(user.getCustomproperty6()==('80119')?'0011e00000S33CgAAJ':(user.getCustomproperty6()==('80086')?'0011e00000S33CfAAJ':(user.getCustomproperty6()==('80076')?'0011e00000S33CeAAJ':(user.getCustomproperty6()==('80060')?'0011e00000S33CdAAJ':(user.getCustomproperty6()==('80052')?'0011e00000S33CcAAJ':(user.getCustomproperty6()==('80048')?'0011e00000S33CbAAJ':(user.getCustomproperty6()==('80044')?'0011e00000S33CaAAJ':(user.getCustomproperty6()==('80042')?'0011e00000S33CZAAZ':(user.getCustomproperty6()==('8062')?'0011e00000S33CYAAZ':(user.getCustomproperty6()==('80019')?'0011e00000S33CXAAZ':(user.getCustomproperty6()==('79300')?'0011e00000S33CWAAZ':(user.getCustomproperty6()==('75000')?'0011e00000S33CVAAZ':(user.getCustomproperty6()==('74444')?'0011e00000S33CUAAZ':(user.getCustomproperty6()==('74400')?'0011e00000S33CTAAZ':(user.getCustomproperty6()==('74000')?'0011e00000S33CSAAZ':(user.getCustomproperty6()==('73500')?'0011e00000S33CRAAZ':'0011e00000lpMAFAA2')))))))))))))))))))))))}\",\"HN_Start_Date__c\":\"${(new Date()).format('yyyy-MM-dd',TimeZone.getTimeZone('AEDT'))}\",\"HN_End_Date__c\":\"2099-12-31\"}",
"httpHeaders": {
"Authorization": "${access_token}"
},
"httpContentType": "application/json",
"successResponses": {
"statusCode": [
201
],
"unsuccessResponses": {
"statusCode": [
400,
401,
404,
405,
500
]
}
}
}
]
}
[This message has been edited by moderator to mask Url]
02/14/2024 08:03 AM
use "arsTasks"
02/14/2024 06:25 PM - last edited on 02/14/2024 10:11 PM by Sunil
Thanks!! arstasks object works but still it gives json parser error for below JSON i believe it is giving for line where we are trying to conctenate D_
Is there anyway to concatenate D
02/14/2024 08:14 PM
02/14/2024 08:19 PM
HI Rushikesh,
Can you suggest how to concatenate D_ in above json mnetioned in comments
02/14/2024 08:24 PM
${if(arsTasks.source=='REQUEST') { 'D_' + requestAccessAttributes.get('techno'){ else {'D_' + (user?.username)}}
02/14/2024 08:38 AM
Hi @saurabhp
The binding variables are incorrect ..
example
please use ${user.firstname} instead of ${user?.getFirstname()} the same goes with all the binding varibale provided in the httpParams