Comments (7)
For now what I'm doing is adding in the custom fields into the contact.cs structure
[XmlRpcMember("_Status")]
[Access(Access.Edit | Access.Delete | Access.Add | Access.Read)]
public string _Status { get; set; }
This is a fix but I'd rather not clog up the Contact.cs file with all these extra fields, especially as I'm not able to get into IS to check field types, making this a very labour intensive job (adding field checking it works and changing type if not, for 30+ fields).
from infusionsoft.net.
[XmlRpcMember("_Status")]
[Access(Access.Edit | Access.Delete | Access.Add | Access.Read)]
public dynamic _Status { get; set; }
seems to work so I'll just continue down that route. Hopefully this will help someone else out.
Would still like to know if there's a built in way to read the custom fields though. Cheers
from infusionsoft.net.
There are extention methods in the projection for Custom Fields. use IncludeCustomField(string fieldName)
The sample Shows p.Include(c => c.Id)
I think you can add p.IncludeCustomField("status")
to the projection, and you'll get that custom field back.
from infusionsoft.net.
The Contact Table inherits from an abstract class Table, which has a property of CustomFields, you're value should be in there waiting for you. Is it not?
public IDictionary<string, object> CustomFields
{
get { return _customFields; }
}
from infusionsoft.net.
Yeah I'm using the following from that sample.
//Find contact vanilla api style
var contacts2 = client.ContactService.FindByEmail(email, new[] {"Id", "Email"});
I'm getting the custom fields back in the xml but I didn't know how to call them in the code. I'm guessing they don't get added to the customFields dictionary unless used the way you've pointed out though. Thank you I'll look into that
from infusionsoft.net.
That's right, the CustomFields projection adds them correctly on the return payload, where the string[] ignores the unknown fields. So they're coming back, they just don't have a home.
Enjoy the project!
from infusionsoft.net.
Perfect thank you. Will do. It's been a live saver so far :-)
from infusionsoft.net.
Related Issues (20)
- OAuth HOT 2
- Using DataService.Query<Table>(page, queryBuilder,fieldSelection) with dates in queryBuilder returns no results. HOT 4
- DataService.Count HOT 3
- RecurringOrderWithContact field HTMLSignature preventing Query<RecurringOrderWithContact>(..)
- Issue calling FileService.UploadFile HOT 8
- ContactService.AddToCampaign {"Server returned a fault exception: [6] [Loading]Error loading follow-up sequence"} HOT 1
- Create Tag/ Get all Tag / Get Tag by Name HOT 2
- .Net Helper Library for REST api support
- Question: What is the "application" value expected? HOT 1
- Error on .Update = A parameter is of, or contains an instance of, type System.Collections.Generic.Dictionary... which cannot be mapped to an XML-RPC type HOT 3
- Unable to get the InfusionSoft project to work in VS2013 HOT 1
- InfusionSoftException when using FindByEmail and IncludeAll
- Hello
- Cannot retrieve custom fields with api call. HOT 1
- Query by Ids
- API ChargeInvoice response contains implicit string value where integer expected HOT 3
- Doesn't work with .net core HOT 2
- New .NET Infusionsoft Client
- TLS 1.2 HOT 9
- How can i create a custom field for Contact? HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from infusionsoft.net.