S
Sungard
I have built a custom field editor addin in MS Project (using VSTO/VS 2008).
Since it is an addin, it must deal with the local changes made by PM's that
are cached in the local cache rather than the PSI values in the server which
may become outdated while the project is open due to local caching. (I used
the PSI for awhile, but the local cache is not properly updated when writing
back to the server - so reverted back to "VBA"-style code).
I need to determine if a custom field (for example a cost) is "null" or if
it has a value in it. Using the PSI, this is easy to check, however using the
client-side VBA calls, I am stuck on determining this. Here are the calls I
use for example:
‘ For
‘ Read project custom fields
fieldValue = proj.ProjectSummaryTask.GetField(field)
‘ Write
proj.ProjectSummaryTask.SetField(field, projectFieldValue)
When I read a cost field, this call returns "$0.00" even though the field is
"null". So, I can't tell if the user reallyl input "$0.00" or if the field is
"null".
*
Please let me know how I can determine if the the field is null using the
client side VBA.
*
Also, using PSI bypasses the local cache and introduces too many issues when
creating an addin. Is there an API for the local cache to force refresh of
the cache etc. after writing using the PSI?
Thank you in advance for your advice!
Since it is an addin, it must deal with the local changes made by PM's that
are cached in the local cache rather than the PSI values in the server which
may become outdated while the project is open due to local caching. (I used
the PSI for awhile, but the local cache is not properly updated when writing
back to the server - so reverted back to "VBA"-style code).
I need to determine if a custom field (for example a cost) is "null" or if
it has a value in it. Using the PSI, this is easy to check, however using the
client-side VBA calls, I am stuck on determining this. Here are the calls I
use for example:
‘ For
‘ Read project custom fields
fieldValue = proj.ProjectSummaryTask.GetField(field)
‘ Write
proj.ProjectSummaryTask.SetField(field, projectFieldValue)
When I read a cost field, this call returns "$0.00" even though the field is
"null". So, I can't tell if the user reallyl input "$0.00" or if the field is
"null".
*
Please let me know how I can determine if the the field is null using the
client side VBA.
*
Also, using PSI bypasses the local cache and introduces too many issues when
creating an addin. Is there an API for the local cache to force refresh of
the cache etc. after writing using the PSI?
Thank you in advance for your advice!