I am trying to get list of estimates from zoho books to zoho creator but its giving me error of data type mismatch - zoho

Please check this image for more details and code its simple code but i am getting datatype mismatch error
https://i.stack.imgur.com/rDYH6.png

This is the common format to get list of records in zoho books module.
<variable> = zoho.books.getRecords(<module_name>, <org_ID>, <search>, <connection>);
module_name: Name of the module
org_id: Your organization id
search: specifies the values based on which the records will be filtered. You can specify an empty string or an empty map for this param, in which case all the records will be fetched
connection: Name of the connection
In order to get list of estimates Please do the following,
response = zoho.books.getRecords("Estimates", "54654632", "", "zbooks");
For further clarification refer this document https://www.zoho.com/deluge/help/books/fetch-records.html
If you have any other queries reach out to us at support#zohobooks.com

You are using single quotes for strings which Deluge intercepts as date or date-time strings. Use double quotes instead.

The error shown on the screenshot is caused by the single quote you're using instead of double quotes (").
You can use as following:
data = zoho.books.getRecords("Estimmates","OrganizationID","Connection");

Related

Dialogflow CX - using sys.person gives wierd output

https://i.stack.imgur.com/k1bZD.png
I am using sys.person to capture the person's name. Is there any way for just 'john' and not the entire {"name": "john"} to show instead? I want to avoid sys.given-name and sys.last-name since dialogflow says they are deprecated.
Do you have your entity configured as a list? If it is a list, you probably have to output the parameter like $session.params.name[0].name.
If it's not a list, $session.params.name.name would work, but in that case I suggest you change the entity name to person, as it would be more readable to see $session.params.person.name
From your screenshot, it looks like your parameter is an isList parameter.
I have checked today the behavior of static responses when referencing isList parameters and it seems that we can now display the list of values for a certain parameter without the array index in the responses using the format: $session.params.parameter-id.
In your case, it would be:
$session.params.name.
In addition, if you want to reference a specific array index in an isList parameter, you can use the format $session.params.parameter-id[i]. In your case, it would be $session.params.name[0]
or if you want to get the original value you can reference it as $session.params.name[0].original

Mailchimp API merge fields - date format

I am using the Mailchimp API to add a new member.
I have defined a custom merge field called ADDED which is the date I added this member to the list. I want this field to be required when submitting it via the API. I defined it as DD/MM/YYYY format (see below):
This is what my json string looks like:
{
"email_address":"email#server.com",
"status":"subscribed",
"merge_fields":
{"USERLEVEL":"1", "BATCH":"999000", "ADDED":"21/04/2020"}
}
As you can see, my format is indeed `dd/mm/yyyy', but when submitting the API request, I get this error message:
**Your merge fields were invalid: Please enter the date**
{"type":"http://developer.mailchimp.com/documentation/mailchimp/guides/error-glossary/",
"title":"Invalid Resource","status":400,
"detail":"Your merge fields were invalid.",
"instance":"1ad6bc0e-7728-45c1-a308-b751247efb5b",
"errors":[{"field":"ADDED","message":"Please enter the date"}]}
Can anyone explain why I am getting this error, when I do seem to have the correctly formatted date in the request?
Thanks.
OK, it seems that the definition of the field as DD/MM/YYYY might only be for reading purposes. but for submitting, it must be done like this:
"ADDED":"2020-04-21T00:00:00.001Z"

Jmeter - convert a string to base64

I've just started out trying to write some tests in jmeter. It's the first time I've used it in earnest, and I'm struggling a bit with it.
I am running a test that searches for data on a website.
The returned data is in the format baseURL/customerID=
Now, the customer number depends on the customer being searched for and it is in base64.
I'm struggling to see how I can get the url updated.
I can see in the request that the field is parameter, and I know what the value is, as I have it stored in a csv file as CustomerID.
How can I convert that csv data to the url parameter?
I'm trying to use beanshell at the moment with this:
import org.apache.commons.codec.binary.Base64;
String customerID = vars.get("customerID");
String customerStringEncoded = Bas64Encoder.encode(customerID);
vars.put("customerStringEncoded",customerStringEncoded);
But it seems that it can't locate customerID.
I am supplying it wiht ${CustomerID} in the preprossor menu option, but I don't know what is wrong.
the error is "Typed variable declaration : Attempt to resolve method: encode() on undefined variable or class name: Bas64Encoder
"
Any tips?
Thanks
tgb
If the data is being stored in csv, you can use the "CSV Data Set config" to read the CSV File. CSVhttp://jmeter.apache.org/usermanual/component_reference.html#CSV_Data_Set_Config

Can Jmeter LDAP Request or LDAP Extended Request populate a multi-valued attribute?

I am working on a Jmeter LDAP test plan and the test plan has to populate an attribute on the LDAP that is multi-valued.
When I do an LDAP search sampler, I noted that the value I get back is a string, with the values separated by ", ".
But, if I take the same comma-separated string and try to do an LDAP modify or add, using either an LDAP Request or LDAP Extended Request, I get an error.
So I am wondering if there is a way that the Jmeter LDAP Request or LDAP Extended Request can do that?
Thanks,
Jim
EDIT: When I try to use an Extended LDAP Request modification test/add with the attribute of "", I get this error in the Jmeter GUI response:
When attempting to modify entry cn=xxx... to replace the set of values for attribute lastlogindate, value "20181023085627-04, 20181024063205-04" was found to be invalid according to the associated syntax: The provided value "20181023085627-04, 20181024063205-04" is not a valid generalized time value because it contains an invalid character '-' at position 14
The strange part is that even though I have Jmeter to log at debug level, I don't see any detail on the error in the Jmeter.log, but/so I am guessing that that error message is coming from the Jmeter client itself. I noticed that the message says:
to replace the set of values
so it seems like it recognizes that I am trying to modify/replace a multi-value, but it doesn't seem to like the syntax of the replacement values string(s).
Does anyone know what the correct format SHOULD be?
I found the answer to my own question, or at least "A" answer: It appears that I can use an Extended LDAP request, and add the same attribute in that request, multiple times. So for example, if I am populating an attribute named "foo" the Extended LDAP request would have the following:
attribute value opcode
foo 12345 add
foo 12346 add
etc.
I think I also need to do a replace with no value, to empty the attribute, before all the adds.

Bing Maps Query API, query by address instead of lat/long doesn't seem to work

Based on this documentation, I should be able to construct the query url with an address string inside the spatialFilter paramater. It works when I pass in the longitude/latitude, but I need to be able to pass in an address, a zip code, a city, or a state. An end user will be making a query for nearby locations of this custom datasource, they won't be searching geo-coordinates in the search box. Whenever I pass in a string other than lat/long, I receive a 400 BadRequest response: "Latitude values must be between -90.0 and 90.0 degrees."
Here is what my request url looks like:
https://spatial.virtualearth.net/REST/v1/data/myId/myDataSource/myEntity?spatialFilter=nearby(ADDRESS_STRING,1000)&$format=json&$top=10&key=myKey&jsonp=callback
Make sure that you have single quotes on either side of your address string. For example:
http://spatial.virtualearth.net/REST/v1/data/20181f26d9e94c81acdf9496133d4f23/FourthCoffeeSample/FourthCoffeeShops?spatialFilter=nearby('Paris',100)&key=YOUR_BING_MAPS_KEY
If your address has a single quote in it, then you have to escape it the OData way which consists of putting two single quotes together. For example "o''clock"

Resources