FrankK
3 May 2012, 6:52 AM
I just ran into an issue where I use the data field.convert function to create a display_name for my list. It is a combination of 3 other fields on the record. As I saved the record back to my REST API, I was expecting the display name to automatically update itself because the 3 fields it references were changed. This wasn't the case.
I found that when using a REST API, you must return this display_name field (display_name: '') in the API return. If you are only referencing other fields on the record it doesn't matter what the return value is. It will run the convert function and use the new record data. If you do not return the field in your return, you will still be looking at the old display_name because ST only processed fields that are returned by the API.
Just wanted to post this so someone else doesn't have to troubleshoot it as much as I did.
I found that when using a REST API, you must return this display_name field (display_name: '') in the API return. If you are only referencing other fields on the record it doesn't matter what the return value is. It will run the convert function and use the new record data. If you do not return the field in your return, you will still be looking at the old display_name because ST only processed fields that are returned by the API.
Just wanted to post this so someone else doesn't have to troubleshoot it as much as I did.