Application Programming Interface forums

0 Subscribers

3 Topics

4864 Conversations

Area for questions and answers about SuperOffice API's.

push_pin lock

Error 411 missing content-length when doing av http.Post

I get "HTTP Error 411. The request must be chunked or have a content length." when I do a post. It's working from Postman and JavaScript. But not from CRM-script. The header Content-Length is correct, but it seems that it does not "read" it.  Anyone? From debug log: => Send header POST /api/sale HTTP/1.1 Host: api.123.no Accept: */* Content-Type: application/json Authorization: xxxxxxxxxxxxxxxxxxxxxxxx Content-Length: 100 traceparent: 00-ed27b3cd060c4144a33c4a6f5e705d16-d6bbf292bd167881-01 => Send data {"OrderDate": "2024-09-06 13:53:13","OurRef": "Frode Folleras","CustomerNo": "12345", "Lines": [{}]} <= Recv header HTTP/1.1 411 Length Required

FF

Frode Follerås
1
0
6 Sep 2024 | 11:59 AM
Topic:
Service and CRMScript Discussion
push_pin lock

Opening document dialog using soprotocol on company entity level broken since 10.3.8

Hi, We use the following soprotocol to open a newly created document from a task menu: soprotocol:document.details?document_id=<document id> Now that customers have been upgraded to 10.3.8, we gotten reports that the above soprotocol does not work anymore on company level. Exactly the same soprotocol does work on project level. (You can reproduce this by creating a button in the screen designer that executes above soprotocol on company level and project level) For both company and project level I did notice that the following console message is logged when executing the soprotocol: Are we using the wrong soprotocol here? (I also tried main instead of details, no change), or is this a bug that was introduced during the work for the SCILified document dialog?  
David Hollegien
2
4
4 Sep 2024 | 12:22 PM
Topic:
Online development and web service API's

Last reply

Sadly not public (yet)
by David Hollegien
5 Sep 2024 | 11:54 AM
push_pin lock

Traces keeps getting disabled

Hi, Since the last update regarding Traces (where a few new options was added) we have expirenced quite a frustration thing, it keeps disabling, alot. Without the script crashing, it usually can run 1 to 3 times, and then its set to disabled, and this can be within secounds or minutes. It can be as simple scripts that changes the title, run the script 2 times with the exact same data and it gets disabled after the 2nd time Anyone experience the same thing? and most importantly, is there anyway to force it not to be set to disabled? Regards Pär  
Pär Pettersson
3
2
4 Sep 2024 | 06:32 AM
Topic:
Service and CRMScript Discussion

Last reply

As Bas says, there is a limit on 100 traces in the log. It will disable it self if you exceed this limit. So you will have to delete the old traces.

KR

by Kasper Rosenlund
5 Sep 2024 | 08:49 AM
push_pin lock

New CRMScript editor (again): Monaco

Hi all, We have been testing whether it is possible to replace Codemirror as our CRMScript editor with Monaco (the basis of VSCode). We have currently implemented this as a testable feature in our latest build, hoping that some of you will try it out and tell us what is not working :-) You can enable Monaco as your CRMScript editor by using the "rms.fcgi?action=debug" panel and tick the Monaco-checkbox. The setting is stored as a cookie in your browser and will only affect you in that particular browser, other users will not be affected. This setting is available in build "main_10.3.7_2024.05.23-01". Sverre
Sverre Hjelm
13
42
23 May 2024 | 08:04 AM
Topic:
Service and CRMScript Discussion

Last reply

I tested this in the upcoming release, and it now works as you would expect.
by Stian Andre Olsen
5 Sep 2024 | 06:15 AM
push_pin lock

List of Virtual fields in SearchEngine

Hi guys   For years i've been frustrated everytime i needed to use the so-called "Virtual fields" in searchengine - the only "documentation" i can find about this, is this blog post:  https://docs.superoffice.com/en/automation/crmscript/searchengine/using-the-searchengine-class-blog-post.html It briefly mentions a couple, such as fullname ,  emailAddress , and  direct/formattedNumber . Yet the post implies there are others.... Where can i find a list of these??? It would save me so much time and guesswork if someone could point me in the direction of some documentation on these fields, and preferably all of them!   Thanks in advance.  
Dennis Aagaard Mortensgaard
5
5
19 Aug 2024 | 09:37 AM
Topic:
Service and CRMScript Discussion

Last reply

Thank you :)
by Dennis Aagaard Mortensgaard
29 Aug 2024 | 08:12 AM
push_pin lock

ERP Sync Connector - Is it possible to display date values as plain dates in ERP-Tab?

I have created a couple of ERP-Sync connectors using the SuperOffice ERP Integration Server. On the ERP-tab date values are displayed as fully specified date time values as shown below (Fields "Gruendungsdatum", "Mandant seit", "Mandant bis"):: Is there a way to display date values on the ERP-Tab as plain dates - i. e. MON, MAY 09 2022? MetadataTypeInfo used:   FieldType =FieldMetadataTypeInfo.Datetime, Any ideas would be greatly appreciated.

RS

Ralf Saha
1
0
26 Aug 2024 | 04:13 PM
Topic:
Online development and web service API's
push_pin lock

API stops after 65000 records

Hi We have a sql datawarehouse setup and every night there is a process where a service connects to the SO API and synchronizes our data. Last night there was an interruption after 65000 records in the Appointment table. Projects, Contacts and Users didnt give an error. I started the sync twice now and each time the sync stops after 65000 records in the Appointment table and log the following error:  System.Net.Http.HttpRequestException: An error occurred while sending the request. ---> System.Net.WebException: The remote name could not be resolved: 'online4.superoffice.com' I tried checking with Postman if there was an error but also there I notice something different. I check the TenantStatus to get the correct API url; in our case thats online4.superoffice.com/... but when I use that API with de SO-AppToken and SOTicket in the header (like we always do) we now get a 401 Unauthorized error. Is anyone aware of any changes to the API or why the sync systematically breaks after 65000 records? Any help appreciated! Thanks in advance

EC

Eddy Claesen
4
4
20 Aug 2024 | 08:09 AM
Topic:
Online development and web service API's

Last reply

Hi Eddy, I see the API calls you're making and I would sugguest optimizing even more these requests: https://docs.superoffice.com/en/developer-portal/best-practices/index.html#optimization When you get into the higher number it may be an idea to include like a give me a batch from the last primaryKey order by primaryKey.  Do contact us at appdev@superoffice.com if you want more insight than what you get in the developer portal under metrics: https://docs.superoffice.com/en/developer-portal/analytics/metered-services.html
by Margrethe Romnes
20 Aug 2024 | 03:05 PM
push_pin lock

Rename a document in sharepoint to a custom name

Hello everyone, if this is the wrong forum for my question, take my apologies and please guide me to the correct forum... I do want to rename a file (saved to sharepoint) based to the header name with CRMscript. But at least for our tenant, this does not work. The script basically does this:     String myNewHeader = myWantedHeader + docheader;     String myDocumentName = myWantedHeader + docheader + ".docx";     thing.SetHeader(myNewHeader);     thing.SetName(agent.RenameDocument(myDocID, myDocumentName));     agent.SaveDocumentEntity(thing); The Header is set right, but the document does not seem to be renamed in sharepoint. Also i do not get any error message - it just does not work. Am i doing something wrong here? Thanks and kind regards Joerg Hermanns  

JH

Jörg Hermanns
2
3
10 Jul 2024 | 07:38 PM
Topic:
Service and CRMScript Discussion

Last reply

Hello Jörg,  After digging into this there seems to be an issue with renaming files that are stored in sharepoint.  We have created a bugreport on it, hopefully it will get fixed in the future.. Sorry! //Eivind
by Eivind Fasting
13 Aug 2024 | 11:16 AM
push_pin lock

WebApi Dotnet Core sample repo

Hello dear SuperOffice! I'm trying to use your sample repo for dotnet core.  This one 2 be precise. https://github.com/SuperOffice/SuperOffice.WebApi-Samples/blob/main/SuperOffice.WebApi.NetCoreSample/SuperOffice.WebApi.NetCoreSample.csproj When trying to invoke the main method in Program.cs row 64, I get hit with this error right after: This is when it is trying to get "GetSystemInfo" just in the beginning of the main method. Any idea why? Kind regards, S

SH

Seph Heravi
2
4
7 Aug 2024 | 08:33 AM
Topic:
Online development and web service API's

Last reply

Thank you for the quick response. Thank you for updating the repo. Kind regards,  Seph

SH

by Seph Heravi
7 Aug 2024 | 12:46 PM
push_pin lock

ListAgent.GetAllLegalBaseAsync fails with InternalServerError

Hi, we are trying to use the SuperOffice.WebApi.Agents.ListAgent to get all legal bases using the following call: new SuperOffice.WebApi.Agents.ListAgent(webApiOptions).GetAllLegalBaseAsync() However, we get an error: SuperOffice.WebApi.Authorization.Exceptions.SuperOfficeWebApiException: InternalServerError Internal Server Error    at SuperOffice.WebApi.Agents.AgentBase.ThrowOnResponseError(HttpRequestMessage request, HttpResponseMessage response) ... The following call for the GetConsentPurposesAsync method using the same webApiOptions works perfectly: new SuperOffice.WebApi.Agents.ListAgent(webApiOptions).GetConsentPurposesAsync() Any ideas?
Dmitry Kuskov
2
3
23 Jul 2024 | 08:01 AM
Topic:
Online development and web service API's

Last reply

I think it's a bug... either in the code generator... or just misconfigured in the model. The methods GetAllConsentSourceAsync and GetAllLegalBaseAsync do not have a backing implementation.
by Tony Yates
25 Jul 2024 | 10:32 AM