Closed daissatou2 closed 3 years ago
@chaiwa-berian @taylordowns2000 this is the second GRS issue to be worked on today. Let @daissatou2 know if you have any questions.
@aleksa-krolls @daissatou2 This job is ready for testing. Kindly link it to a job in prod
whenever you are ready to test. The biggest surprise is mapping the X4_0_Forms_of_abuse_experienced_before__c
picklist. When you have a moment, tomorrow morning, @daissatou2 or @aleksa-krolls kindly let me know so I can have a quick look at the way the picklist looks in SF! Right now it is not clear how the values should be sent, so we are getting the error below: INVALID_OR_NULL_FOR_RESTRICTED_PICKLIST: 4.0 Forms of abuse experienced before: bad value for restricted picklist field: Sexual Physical Emotional Verbal Neglect
Thanks Chaiwa! I've already let the client know to update the data type for X4_0_Forms_of_abuse_experienced_before__c
to multi-select, so we'll wait for that and update the job as necessary.
@chaiwa-berian @aleksa-krolls The job is passing for the message that upserts both NewReferral__c and Risk_Assessment__c.
However, it is failing for the messages where we're upserting only one of the objects (because the other object's fields are missing in the message). See runs below. The job should pass when we're upserting both objects AND when upserting just one.
Upsert New_Referral__c only: https://www.openfn.org/projects/pd3yk4/runs/rj5exyyz Upsert Risk_Assessment__c only: https://www.openfn.org/projects/pd3yk4/runs/rn5dm8bb
@chaiwa-berian Can you please check out @daissatou2 feedback this morning? cc @taylordowns2000
@chaiwa-berian The client has updated the type for X4_0_Forms_of_abuse_experienced_before__c
from picklist to multi-select picklist.
Please resolve this error message: X4_0_Forms_of_abuse_experienced_before__c
For multi-select picklist Salesforce expects the format value1; value2 (separated by ;)
@aleksa-krolls @daissatou2 , This is fixed. I tested the three messages below and they all pass:
Background, context, and business value
The
Risk & Vulnerability Assessment | Service Referral - Treatment, Care and Support
form can upsert both theRisk_Assessment__c
object and theNewReferral__c
object depending on how it is filled out. Use the mapping sheet to create a job that upserts one or both objects.The specific request, in as few words as possible
1 new job that may perform 1 or 2 operations...
If
form.do_you_want_to_perform_a_risk_assessment
is in the message isyes
then upsertRisk_Assessment__c
usingstate.data.id
as the unqiue identifier.If
form.risk_assessment.drugs_and_alcohol_use.complete_service_referrals
isyes
&&form.referral_services
is present then upsertNewReferral__c
usingform.subcase_0.case.@caseid
as the unique indentifier.Please ignore the rows in yellow.
Use this other job https://www.openfn.org/projects/pd3yk4/jobs/jv4er4 as an example of how to upsert the
NewReferral__c
object.state.json
Salesforce creds: See LP GRS Salesforce Sandbox CommCare creds: See LP GRS CommCare App
Upsert Risk_Assessment__c only: https://www.openfn.org/projects/pd3yk4/messages/m8qvpw3e Upsert New_Referral__c only: https://www.openfn.org/projects/pd3yk4/messages/mmq5rz7n Upsert both: https://www.openfn.org/projects/pd3yk4/messages/m664jnp8
adaptor
Salesforce
trigger
Form
name
: Risk & Vulnerability Assessment | Service Referralexpression.js
New job you can link to prod here: https://www.openfn.org/projects/pd3yk4/jobs/jvbbrp