问题
We have a software that is integrated with SalesForce using SF SOAP API. As we are sending/receiving data to/from SF on user level, we must know which SF objects and object fields is user allowed to access (based on SF visibility rules). Therefore, we first invoke describeSObject(objName) and store it to our cache to speed up integration.
What happens is, when our clients change visibility rules or rename object fields on SF side, they must invalidate cache in our application. If they forget to do that (and they usually do), we are not aware that our cache is invalid.
Question: is there a way to invoke our web service from SF when visibility rules changes, or object field is added/deleted/renamed? If that is possible, as visibility rules in SF are quite complex, how can we differ which users are affected by change (so we do not invalidate cache for everyone)?
回答1:
I suspect you can't currently.
As an alternative, catch the exceptions that occur due to the metadata mismatch and flush the local cache for that user. Then retry the original request with the updated metadata.
来源:https://stackoverflow.com/questions/18676681/salesforce-integration-notify-external-system-on-sf-object-definition-change