SalesforceMagic icon indicating copy to clipboard operation
SalesforceMagic copied to clipboard

Some fields are valid to supply when inserting, but are not allowed to be updated.

Open benbenwilde opened this issue 10 years ago • 5 comments
trafficstars

I ran into this issue when creating an object via Insert and then updating it later via Update. One of the properties is an id pointing to a parent object, and the property cannot be edited after its created (this is just because of a setting on the object in salesforce). Maybe we could add another attribute like SalesforceInsertOnly or something similar to deal with this situation. I don't know if thats the best way to go about it or not. Right now I just set it to null when updating and that works ok for now.

benbenwilde avatar Apr 17 '15 02:04 benbenwilde

I have been thinking about consolidating the attributes into a single configurable attribute. The individual attributes would still be supported but deprecated.

michael-shattuck avatar Apr 20 '15 16:04 michael-shattuck

+1

It becomes difficult with the SalesforceIgnore attribute also affecting the reads.

zendever avatar May 12 '15 14:05 zendever

Yeah I was setting it to null but that broke cuz then the null handling got fixed (setting the salesforce field to null when you pass null) which is obviously good actually.

So I just use different objects for read and write for now.

benbenwilde avatar May 12 '15 15:05 benbenwilde

Currently there is a SalesforceReadonly attribute that might help, but I am currently working on a single attribute that will have configurable options, also making objects cleaner.

michael-shattuck avatar May 14 '15 16:05 michael-shattuck

is SalesforceIgnore working in the current release? I'm using it, but it isn't ignoring..

derekforeman avatar Aug 18 '15 19:08 derekforeman