Issue
When attempting to sync the Prior Year Leaver Parent entity, the system returns failed records with the following errors:
- Prior Year Leaver Parent Exception was thrown while mapping PriorYearLeaverParent, postalCode is a required property for TxPriorYearLeaverParentAddress and cannot be null.
- Prior Year Leaver Parent Exception was thrown while mapping PriorYearLeaverParent, city is a required property for TxPriorYearLeaverParentAddress and cannot be null.
The error message does not list the student's Unique ID (STU.CID).
Cause
The errors are caused by students who have a contact with the Contact Order (CON.OR) code 01 or 02, and these contacts have a blank City (CON.CY) or blank Zip Code (CON.ZC).
The Prior Year Leaver Parent criteria for being extracted in the Prior Year Leaver Parent entity are as follows:
Resolution
The Contacts with a blank City (CON.CY) or Zip Code (CON.ZC) will need those codes added.
Run the following query to find the contacts with the Contact Order (CON.OR) code of 01 or 02 for all students in 7th Grade+ that are missing the City (CON.CY) or Zip Code (CON.ZC).
LIST STU CON STU.TG STU.SC STU.ID STU.CID STU.NM STU.GR CON.FN CON.LN CON.RL CON.RL? CON.OR CON.AD CON.CY CON.ST CON.ZC IF ( CON.AD = " " OR CON.CY = " " OR CON.ST = " " OR CON.ZC = " " ) AND ( CON.PC = Y OR CON.ERH = Y OR CON.LW = Y OR CON.AP = Y ) AND CON.CD # R AND ( CON.OR = 1 OR CON.OR = 2 ) AND STU.SC < XXX AND STU.TG # "*" AND STU.GR >= 7
*Remember to Include inactive students.