Start a new topic

API coding for adding a single phone consent when mobile and landline numbers have both opted in or out

Hi There

I'm a novice at coding so I hope you can help. 

I want to be able to add a Phone consent of Yes when the fields of Home Telephone AND Mobile have an Opt In.  I would like to then add the home phone AND the mobile numbers to the phone consent constituent attribute comment field.


What I've coded below doesn't feel right.  Can anyone help?

   If Import.Fields.GetByName("Default - Home Telephone").Value= "%Opt In%" Or Import.Fields.GetByName("Default - Mobile").Value= "%Opt In%" THEN

   Import.Fields.GetByName("GDPR Phone_Desc").Value = "Yes"

         Import.Fields.GetByName("GDPR Phone_Date").Value=Import.Fields.GetByName("Created Date").Value

         Import.Fields.GetByName("GDPR Phone_Comments").Value = Import.Fields.GetByName("Phone").Value +""+ Import.Fields.GetByName("Mobile").Value

        End If


Thanks in advance.


Felicia Nair

Login or Signup to post a comment