Lee Savidge
Members-
Posts
6 -
Joined
-
Last visited
-
Days Won
1
Lee Savidge last won the day on April 10
Lee Savidge had the most liked content!
Reputation
3 Neutral-
Country list and state/province list
Lee Savidge replied to Lee Savidge's topic in Sage Intacct Developers's Developer forum
@Sterio, Louis I figured as much. Thanks. I'll have to assume for now that they are using the ISO country list so I'll use that for now. Cheers Lee -
Lee Savidge started following Country list and state/province list
-
I'm trying to push customer records in from a new integration I am working on. However, the source system use a free text field for country and state/province. This is a pain. I have been led to believe that the countries can be sent as ISO codes, which is great, but the problem is that the state/province cannot be done that way. So, let's assume the source system is trying to send Canada. If I put Canada into the country field it correctly does its stuff and also sets the ISO country code field as the values match. If I put Canada into the ISO country code field it fails as this requires the 2 digit code, CA. If I put CA into the ISO field it correctly sets Canada and the ISO country code field. If I put CA into the country field it fails. So, all this is obvious. I will let the customer know to pass the ISO code and we're good. However, let's say for example, the country is Canada and the source system has a Vancouver address which is in British Columbia. In their state/province field they have BC, they could have B.C. or B C, or British Columbia or even Bitish Columbia. If I send anything other than British Columbia it successfully sends, but that field value is ignored. Is there a way to get out of Intacct, all state/provinces by country? If you use Australia as the country, the state/province drop down changes to the Australian states and territories. I am sure it coes others (weirdly it doesn't set the UK counties list but we can ignore that). So, to summarise, I need a list of all country and states/provinces/territories that Intacct has. Can I get this via a Postman call via the API? I coudn't see a way.
-
I would imagine it is setting the content type appropriately. If I was curious, I would set up a small web service and call if from the trigger and query the content type just to see, but I would be surprised if it doesn't. That being said, I've never bothered as it is easier to write a key/value pair list than it is to write JSON by hand which is why I always use the name/value pairs.
-
I don't know mulesoft, but I use the triggers regularly to post out to an external application and the easiest way is to use name-value pairs. It posts them as a form post, the MIME type is application/x-www-form-urlencoded, and you can pick that up in Mulesoft https://help.mulesoft.com/s/question/0D52T00004mXXkzSAG/xwwwformurlencoded-in-http-request-connector-as-post Your mileage may vary. I write my own APIs in C# using MVC and post out to them using triggers or smart events, but either way, the name-value pairs is the easiest. You write out which fields you want in the arguments text box as a list like this: sessionid={!USERPROFILE.SESSIONID!} endpoint={!API_ENDPOINT!} useremail={!USERPROFILE.EMAIL!} authkey={!COMPANY.AUTH_KEY!} profile=randomstring entityid={!SODOCUMENT.MEGAENTITYID!} type=PriceList implementationorlive=Live sessionorwslogin=webservices The above is an example, but in EVERY smart event/trigger I do, I pass at least the first 3, if anything, just for logging purposes. The rest in this example are either custom fields, standard fields or strings I need to pass. In my C# code, I pick these out from the Request.Form in a foreach loop. After that, you do what you want. foreach (var formVar in Request.Form)
-
You can add a number field with no decimal places. If the user puts in a decimal amount, it will be rounded to the appropriate value on save. But no, there is no integer field.
- 1 reply
-
- 2