Start a new topic

Remove Date To

Hi,

I'm trying to remove a Date To date from a constituency code through API.  Is there a way to do this?  I'm getting the error RE7.dbo.CONSTITUENT_CODES'; column does not allow nulls. INSERT fails when I try to add a blank to the field.

I tried making it equal to Null but that doesn't work either.  Is there an easy way to remove this date?

Thanks.

Lisa

1 Comment

Set the "Date To" field to an empty string. Obviously, you would have to loop through and target the constituent code in question

 PSUEDO-CODE below:

 

Dim oCode As Blackbaud.PIA.RE7.BBREAPI.CConstituentCode

For Each oCode In oRec.ConstituentCodes
If oCode.Fields(Blackbaud.PIA.RE7.BBREAPI.ECONSTITUENT_CODEFields.CONSTITUENT_CODE_fld_CODE) = "Staff" And oCode.Fields(Blackbaud.PIA.RE7.BBREAPI.ECONSTITUENT_CODEFields.CONSTITUENT_CODE_fld_DATE_TO) ""  Then
oCode.Fields(Blackbaud.PIA.RE7.BBREAPI.ECONSTITUENT_CODEFields.CONSTITUENT_CODE_fld_DATE_TO) = ""
End If
Next
Login or Signup to post a comment