Updating Custom Field with API in Razor Pages, C#

72 views Asked by At

In Pipedrive, when you create a custom field it has a unique API Key, 40 characters long.

I create a public object with the name set to that API key, assign a value, it updates on Pipedrive. All is well in the world, until I have a weird issue of over half my API keys are recognised as multiple arguments.

public object 3441f22235a8f7875f65ca485bd41a6153d8b277 { get; set; }

Is instead interpreted as 3441f + 22235 + a8f7875f65ca485bd41a6153d8b277

Though a object like this:

public object b2d3d90ca133837d26a3fd826cef7085bb49673e { get; set; }

Works perfectly fine. So i'm a bit confused.

To better demonstrate this, might be better to test it on VS yourself. I'm struggling to explain it better. How can I prevent the top object from seperating like that or can I somehow hack it back together with a concatenate?

I'm leaning towards it being a Visual Studio 2019 user-error / configuration error rather than something wrong with the code itself. So my tags are a bit broad, sorry!

1

There are 1 answers

0
Ryan On

In typical fashion, solved an issue that plagued me for several hours minutes after posting on here.

[JsonProperty("3441f22235a8f7875f65ca485bd41a6153d8b277")]
public object Some_Name { get; set; } 

Works a treat and gives me friendly public names too.