Application Programming Interface forums

0 Aanmeldingen

3 Onderwerpen

4799 Gesprekken

Area for questions and answers about SuperOffice API's.

push_pin lock

14/03/2024 Test Forum

Put all speaking her delicate recurred possible. Set indulgence inquietude discretion insensible bed why announcing. Middleton fat two satisfied additions. So continued he or commanded household smallness delivered. Door poor on do walk in half. Roof his head the what. An do on frankness so cordially immediate recommend contained. Imprudence insensible be literature unsatiable do. Of or imprudence solicitude affronting in mr possession. Compass journey he request on suppose limited of or. She margaret law thoughts proposal formerly. Speaking ladyship yet scarcely and mistaken end exertion dwelling. All decisively dispatched instrument particular way one devonshire. Applauded she sportsman explained for out objection. Is post each that just leaf no. He connection interested so we an sympathize advantages. To said is it shed want do. Occasional middletons everything so to. Have spot part for his quit may. Enable it is square my an regard. Often merit stuff first oh up hills as he. Servants contempt as although addition dashwood is procured. Interest in yourself an do of numerous feelings cheerful confined.  
Community Test
0
2
14 mrt 2024 | 02:55 a.m.
Onderwerp:
Client libraries and tools

Laatste antwoord

by Community Test
14 mrt 2024 | 03:15 a.m.
push_pin lock

SaleDate being set 1 day before today.

Hello,   We have identified recently, that a script in our system responsible for setting the SaleDate to today's date for sales with a status other than 1(open) is not working as intended. Upon closer inspection, we observed that after correctly setting the sale date, there is an unexpected step where it is subsequently decremented by one day. I've conducted a thorough check to ensure that no other scripts are conflicting or overlapping with the one in question. This script is the sole instance where the SaleDate is manipulated. This issue has only surfaced recently, as it was functioning as intended at least until December. Both our Production and Test Environments are exhibiting the same problematic behavior and both are on the same build  (Build: Release_10.2.11_2023.12.18-02) Here is a stripped-down version of the script we are running, which is producing the same results. Tracing the script, today yields the following date, which should be inserted. #setLanguageLevel 3; EventData ed = getEventData(); String saleStatus = ed.getInputValue("SaleStatus"); String saleDate = ed.getInputValue("SaleEntity.Saledate"); String curDate = getCurrentDate().toString(); DateTime currentDate = curDate.toDateTime(); String currentDateConverted = currentDate.toString(); If (saleStatus != "1"){ ed.setOutputValue("SaleEntity.Saledate", currentDateConverted); } Any help would be greatly appreciated! Thank you!

A

andrei.berianu@azets.com
2
4
18 jan 2024 | 02:57 p.m.
Onderwerp:
Service and CRMScript Discussion

Laatste antwoord

Hello David,   I see that only Norway is active. The script was activated in early December, and testing did not yield this type of behavior. Only recently I've noticed this.

A

by andrei.berianu@azets.com
19 jan 2024 | 09:23 a.m.
push_pin lock

The new CRMScript Editor - Some feedback

Hi, We noticed this morning that you have launched a new CRMScript "editor". But, we quickly found a few errors that is causing our day to day to become much harder. 1. Indentation does no longer work. Ctrl + A and then Shift + Tab would indent the code, not it just moves everything to the left. 2. Bracket highlights does not always work. Works just fine The else does not. Seems quite hard to recreate when i try to do it "manually", but we have seen this issue in multiple customer enviroments, and, the code works just fine 3. String highlights does not always work. As you see on the log, the debug16 part should be green. Any suggestions?

P

par.pettersson@i-centrum.se
8
31
6 dec 2023 | 01:14 p.m.
Onderwerp:
Service and CRMScript Discussion

Laatste antwoord

Hi Sverre, I did some experimenting, it breaks when an array declaration is involved. Notice the cursor position when going to the next line (using enter) No array: With array: tested on version SuperOffice CRM Online 10.3 Build Release_10.3.1_2024.01.12-04

P

by par.pettersson@i-centrum.se
16 jan 2024 | 01:27 p.m.
push_pin lock

Reply template - best way to show inline images

Hey, The 100 000 dollar question. Whats the best way to try and prevent blocking of images sent from an reply template through the Email class. Most customers accepts that images are blocked by default and its simply a standard on the web.. But, we have one customer that really dont accept this, so, i figure i´ll ask here anyway if anyone have a solution.   We get the same result using uploaded attachment images as well as using a base64. It seems that it might work with using CID, but, not sure how to fix this throu reply templates. Any ideas? Regards Pär I

P

par.pettersson@i-centrum.se
2
3
10 jan 2024 | 09:14 a.m.
Onderwerp:
Service and CRMScript Discussion

Laatste antwoord

Glad I am able to help YOU out for once... ;) Have a great day!

P

by par.pettersson@i-centrum.se
10 jan 2024 | 12:41 p.m.
push_pin lock

Error when trying to create/update tickets in new service (Onsite 10.2.9)

Hello, one of our customers have a problem with the new service in an onsite enviroment, everytime when they try to save a ticket in the new service does the creation fail and they´ll get this error. MicrosoftSQL Server Native Client 11.0SQL ServerThe conversion of a datetime2 data type to a datetime data type resulted in an out-of-range value. They can still create new tickets in the old service. We tried the database on our local machine (We tried creating and updating tickets in the new service), and it worked there which was why we first thought it might have to do with user permissions. We also thought this had to do with user permissions since we could get the ticket list but not create or update tíckets so we tried adding a new copy of the database with new user permissions but that had no effect. We have also tried installing a new Sales&Marketing endpoint but that has not worked out aswell. We have verified that the versions are correct in the SM/CS and the database. There is also another issue when you first try to load in the tickets which generates a 403 error. But when you choose a ticket in the list, the ticket information shows up fine. Have anyone else encountered these problems before? Regards Fredrik

F

Fredrik.larsson@i-centrum.se
2
1
8 jan 2024 | 12:59 p.m.
Onderwerp:
Service and CRMScript Discussion

Laatste antwoord

Difference between the old service client and the new request functionality is that the new request functionality goes through NetServer for retrieving tickets/saving tickets, the old service client does not. Few questions based on the issue your described: - ServerSetup has been ran correctly and all dictionary steps have been performed? (you can check in the productversion table) - Both NewServiceRequest and NewTimezoneHandling feature toggles are enabled for all netserver installations? - NetServer can communicate with Service correctly? (Things like CRMScript triggers do work in CRM?) - Do you have any date/datetime extra field configured on ticket level that is required? or missing a default value setting? - If you click open the response object of the Axios error, there is propably some more information there - Anything logging in the CRM.Web log folder?    

F

by Fredrik.larsson@i-centrum.se
8 jan 2024 | 01:12 p.m.
push_pin lock

Function openCrmDocument not working in service.

Hello, we have a customer that uses the openCrmDocument  function (which uses webtools) in order to open and edit S&M documents in the old service, but it seems like it stopped working after the latest update.  Now when i try to edit the document, the call succeeds but the document won´t open, the document becomes locked for editing in S&M aswell. I tried this function in a onsite enviroment (Version 10.1.6) and it works as intended there.(The document is opening after pressing the button.) This is the function i have been using to test. openCrmDocument("Insert documentId here", "https://online4.superoffice.com/CustXXXXX"); function openCrmDocument(p_documentId, p_soUrl) { var postData = { "method": "SuperOffice.CRM.Web.AjaxMethods.Document.CheckoutAndOpenDocumentWithTrayApp", "arguments": [p_documentId] }; $.ajax({ type: "POST", dataType: "json", contentType: "application/json", data: JSON.stringify(postData), url: p_soUrl + "/clientapi/sessionrequiredmethods/method?ajaxmethod=SuperOffice.CRM.Web.AjaxMethods.Document.CheckoutAndOpenDocumentWithTrayApp" }) .done(function (result) { // Success console.log(result); console.log("Api call success") }) .fail(function (e) { console.log(e); alert( "Failed to open document, This is most likley because you havent installed SuperOffice Webtools." ); }); } Let me know if ii can provide any more information. Regards Fredrik

F

Fredrik.larsson@i-centrum.se
3
3
22 dec 2023 | 09:20 a.m.
Onderwerp:
Service and CRMScript Discussion

Laatste antwoord

Just a quick comment - if this is a screen used as a webpanel in the sales client, then using crossmessaging would make sure this works even with our changed behaviour for webtools:    function openCrmDocument(p_documentId, p_soUrl) {         var message = { "command": "openDocument", "arguments": p_documentId};         parent.postMessage(message, "*");    }  

F

by Fredrik.larsson@i-centrum.se
5 jan 2024 | 10:01 a.m.
push_pin lock

Add or update values in Ticket_origin

Is it possible to update/add a value to the enum Ticket_Origin or is it autogenerated so it can´t be modified?  Regards Fredrik

F

Fredrik.larsson@i-centrum.se
2
1
3 jan 2024 | 09:22 a.m.
Onderwerp:
Service and CRMScript Discussion

Laatste antwoord

Hi Fredrik, This is a hard coded list, you can't add items to it.

F

by Fredrik.larsson@i-centrum.se
3 jan 2024 | 11:13 a.m.
push_pin lock

CRM Data with Rest API

Hi guys I recently created an app with SuperOffice and did the authentication with Vuejs. Currently I am trying to retrieve sales data, but with the requests I make, I either get an example response with an example sale, or the URL is incorrect and an error occurs when I specify an ID as a parameter. Also have the same issue when fetching all Contact. Am I overseeing something? The request is as follows: endpoint: ' https://sod2.superoffice.com/Custxxxx/api/v1/sale ' header: Authorization: Bearer {access token} Accept: ‘application/json’

J

john.adams@job-union.de
2
6
21 dec 2023 | 11:01 a.m.
Onderwerp:
Service and CRMScript Discussion

Laatste antwoord

Hi John, I think you are confusing SuperOffice Environments . Your application is only authorized in the SuperOffice Development (SOD) environment (sod.superoffice.com), while your company has a production tenant in the SuperOffice Online environment (online.superoffice.com). You must first developer your custom applications in the SOD environment, and only after it has passed Validation checks can it be promoted to operate toward your tenant in the production environment.  Please refer to the Developer Portal documentation for more information about Custom Apps .
by Tony Yates
22 dec 2023 | 09:47 a.m.
push_pin lock

unable to access extratable

Using SO Online, I have created a ExtraTable named tid (y_tid) with field tid (x_tid) ExtraTable ex; Bool b = ex.load(2); // ExtraTableInfo getId() verifies id: 2 generates the following error: ExtraTable::load(): No extratable set! at ""   Also get an error trying to POST using Rest API '/api/v1/table/tid' {"x_tid":"100"}   "ErrorType": "UnauthorizedAccessException",   "Message": "You do not have access to the table, or it does not exist",  

D

dan@storevik.it
4
7
31 aug 2023 | 11:07 a.m.
Onderwerp:
Service and CRMScript Discussion

Laatste antwoord

Try refreshing the cache by going to: https://sod2.superoffice.com/CUST<TENANT NR>/cs/scripts/admin.fcgi?_sf=0&action=listExtraTables&restartNS=true or call the flush method from the diagnostics agents ;  

D

by dan@storevik.it
14 dec 2023 | 02:01 p.m.
push_pin lock

How create documents using custom template variables

Hi all. Im trying to create a document with custom variables using the function CreateNewPhysicalDocumentFromTemplateWithCustomTags2. The document is created fine, but it doesn't merge the custom tags. In picture below variable gptt isn't even removed. But right next to it, name of company is merged fine. Both using same format in word-document.   NSDocumentAgent da; NSContactAgent ca; NSPersonAgent pa; NSDocumentEntity doc = da.CreateDefaultDocumentEntity(); Integer contactId = formSubmitSE.getField("form_submission.person_id.contact_id").toInteger()+0; if(contactId > 0) { NSContact contact = ca.GetContact(contactId); doc.SetContact(contact); } Integer personId = formSubmitSE.getField("form_submission.person_id").toInteger()+0; NSPerson person = pa.GetPerson(personId); doc.SetPerson(person); NSDocumentTemplate template; template.SetDocumentTemplateId(180); doc.SetDocumentTemplate(template); doc = da.SaveDocumentEntity(doc); doc = da.CreateNewPhysicalDocumentFromTemplateWithCustomTags2(contactId, personId, 0, doc.GetDocumentId(), 0, 0, 0, Map().insert("gptt", "horse"), "");

K

kro@doweb.dk
3
4
3 okt 2023 | 09:15 a.m.
Onderwerp:
Service and CRMScript Discussion

Laatste antwoord

Hi, I've create a solution before where a created a custom template variable string including a special character. When document is created I replaced the special character, within the custom template variable result, with a line break using a macro. Maybe you could implement something like this.
by Brian Mulder
14 dec 2023 | 01:02 p.m.