forcex icon indicating copy to clipboard operation
forcex copied to clipboard

Create arbitrary SObjects from Map

Open sebbean opened this issue 9 years ago • 4 comments

Enables commands such as:

resp = Forcex.post("/services/data/v20.0/sobjects/Case/", %{ "Subject" => "API TEST 2", "Priority" => "High", "Origin" => "Web"}, client)

Looking to also implement a helper function for creating SObjects using Forcex.Client. Any thoughts or input?

sebbean avatar May 19 '16 20:05 sebbean

Coverage Status

Coverage remained the same at 0.0% when pulling 82878d2bbc934d7bf16d399117ebecda6ed17835 on sebbean:task/enable-sobject-create-call into cd8b4d21b147d59f3529d96ae25d9ec241c0c10a on jeffweiss:master.

coveralls avatar May 19 '16 20:05 coveralls

Coverage Status

Coverage remained the same at 0.0% when pulling 60618d34c4b8d4e252a67f8d7f76199e819fb271 on sebbean:task/enable-sobject-create-call into cd8b4d21b147d59f3529d96ae25d9ec241c0c10a on jeffweiss:master.

coveralls avatar May 19 '16 21:05 coveralls

Coverage Status

Coverage remained the same at 0.0% when pulling 61a182dcd6bbb474daa2c15afd413c4a20e30e65 on sebbean:task/enable-sobject-create-call into cd8b4d21b147d59f3529d96ae25d9ec241c0c10a on jeffweiss:master.

coveralls avatar May 19 '16 21:05 coveralls

@sebbean First of all, thank you! I think we already have something that ought to create an SObject from a map: https://github.com/jeffweiss/forcex/blob/master/lib/mix/tasks/compile.forcex.ex#L80 That said, creating and updating SObject is not my primary use case with this lib, so it hasn't gotten any exercise. We probably do need to set the content type. I will do some investigation.

jeffweiss avatar May 20 '16 04:05 jeffweiss