SedonaOffice as a rule does not like ‘null’ values in database fields. Whenever the SedonaOffice client throws an error when trying to present data, or data does not show in the SedonaOffice client listing, most of the time these issues are caused by null or incorrect default values in the underlying database record.
When posting to SedonaOffice through the SedonaCloud API, these are some general guidelines to follow to avoid posting or updating null values to SedonaOffice.
- ID fields
- if this is unknown or not applicable to the entity being posted, set any ID field in the posted API model = 1
- Date fields
- if this is unknown or not applicable to the entity being posted, set any Date field in the posted API model to either ‘12\/31\/1899’ or "1899-12-31T00:00:00"
- Number fields (integer or decimal)
- if this is unknown or not applicable to the entity being posted, set any number field in the posted API model = 0
- String fields
- The easiest implementation is to post any unknown or not applicable string as an empty string ( = ‘’). Generally, if there is both an ‘ID’ field and a ‘Code’ or ‘Name’ field for the same property (e.g., PartID and PartCode), then the ‘ID’ value needs to be supplied in the post request, and the corresponding ‘Code’ or ‘Name’ field can be omitted from the post.
If the development or support team has access to the actual SedonaOffice database and can browse the individual database tables using SQL Server Management Studio (SMSS), these data issues are typically easy to spot by comparing them to other ‘good’ records previously stored in the database.
For example, the screenshot below is of the AR_Customer_Recurring table. The 3rd record in this table was posted through the SedonaCloud API but did not specify the proper defaults for several of the posted model properties. Note all the ‘NULL’ values in this record. Even though the SedonaCloud API posted this record without error, this Recurring record would not show in the SedonaOffice client for the parent customer details.
Modifying the SedonaCloud API post to include the proper defaults for these ‘NULL’ fields, resolves the SedonaCloud client issues.
