Application Programming Interface forums

0 Subscribers

3 Topics

4868 Conversations

Area for questions and answers about SuperOffice API's.

push_pin lock

NSSource and UserDefinedFields GetDeleted();

Hello Team,   I am trying to set up a script that will prevent our users to close sales that have depracated Sources or in our case, "Sale Department" (Custom Field). After reviewing the documentation, I noticed the Source does not have the GetDeleted() method, and I can't seem to find any information on UserDefinedFields, other than getting them from EventData or mapping them via the Sale Entity. Do you know how I could go about getting the "Deleted" flag for these two? Thank you! #setLanguageLevel 3; EventData ed = getEventData(); /*Source*/ Integer sourceId = ed.getInputValue("SaleEntity.Source.Id").toInteger(); Integer saleId = ed.getInputValue("SaleEntity.SaleId").toInteger(); NSSaleAgent saleAgent; NSSaleEntity saleEntity = saleAgent.GetSaleEntity(saleId); NSSource source = saleEntity.GetSource(); String name = source.GetValue(); /*Sale Dpt*/ //“SaleEntity.CustomFields.SuperOffice:3:DisplayText": "1234 SaleDepartment", //"SaleEntity.CustomFields.SuperOffice:3:DisplayTooltip": "Tolltip", //"SaleEntity.CustomFields.SuperOffice:3:org": "[I:45]" String saleAzetsCompany = ed.getInputValue("SaleEntity.UserDefinedFields.SuperOffice:3");

AB

Andrei Berianu
3
3
15 Jul 2024 | 12:26 PM
Topic:
Service and CRMScript Discussion

Last reply

Carrier objects of list items like Source (or Category, etc), do not include the deleted flag. If you want to know if a list item is deleted you could use the GetListItem method of the mdo agent.  In case of default lists, the list name can be found here: MDO List Providers In case of a custom/ud list, the list name is 'udlist[UDListDefinitionId]' (without the brackets)    
by David Hollegien
13 h, 54 m ago | 10:33 AM
push_pin lock

GetDeleted() and text color

Hello Team, Would it be possible to set all values in a field where GetDeleted() = 1 to Red? Currently deleted values cannot be selected, but if already there, can be saved without issues. Having them listed with red text will provide a visual indication that these need to be changed. Some classes also do not have the getDeleted() method, which means that we can't easily make CRM scripts, without actually tagging the Name or description with a something that we can later use to determine if the value is disabled or not. For example, I am tagging departments that are no longer active with DISABLED_ so that I can script behaviour based on this, which is not really ideal...     Having red text for deleted items and getDisabled() method available for all classes that have the Deleted flag in the DB it would help.   Thank you!

AB

Andrei Berianu
1
0
19 Sep 2024 | 08:30 AM
Topic:
Service and CRMScript Discussion
push_pin lock

change subject for the message on fly while sending it

Hello there In service there is only one subject you can modify if needed and all messages will be sended by using this subject. However, some times if you want to discuss with third party and send out message with different subject, it is not possible without changeing ticket title and after sending it, change it back as it was. Is it possible to show also subject for every message and also changeing it before sending message?  Thanks Regards Ingar

IM

Ingar Mölder
2
1
18 Sep 2024 | 06:30 AM
Topic:
Service and CRMScript Discussion

Last reply

Hi Ingar,   If required, some custom logic could be added to your solution which would allow for dynamically updating the title of a request (or the subject of an e-mail). I would recommend contacting your local consultancy team for assistance.
by Bas Kreijveld
18 Sep 2024 | 06:33 AM
push_pin lock

Automatic e-mail notification to SecondaryPersons(?) about new answers.

Hi, My users can see tickets belonging to their colleagues, and some want to get notifications about tickets that doesn't belong to them. When adding someone to a ticket's SecondaryPersons the persons email appers over the message when writing a new reply in SuperOffice, but SuperOffice only e-mails the person who created the ticket. Can I get SuperOffice to notify SecondaryPersons?

VS

Vidar Sollie
2
2
16 Sep 2024 | 01:08 PM
Topic:
Online development and web service API's

Last reply

Sorry, I meant the external users of our customer frontend. They can mark tickets as favorites (stored in an external DB; I didn’t see a way to do it using the SuperOffice API), but they now want email notifications for favorite tickets. When a ticket has SecondaryPersons, their emails appear above the message when writing a reply, but SuperOffice only notifys the first email. Why?

VS

by Vidar Sollie
17 Sep 2024 | 08:19 AM
push_pin lock

WebTools auto login not working due to download service being offline/unavailable

We are having an issue with webtools auto login (double click on the owl in the tray area), it doesnt work and the log file shows the following: Error    2024-04-30T09:02:31.15    SuperOffice.TrayApp.Server.TrayAppServer>Execute<TRequest, TResponse> SuperOffice.TrayApp.TrayApp2.GetAlarmsRequest SuperOffice.TrayApp.Server.TrayAppServer+OnExecute`2[SuperOffice.TrayApp.TrayApp2.GetAlarmsRequest,SuperOffice.TrayApp.TrayApp2.GetAlarmsResponse] MSSQL - 12 \\\ 1501235947 SuperOffice 10.3.3 NetServer 10.3 Release (Build: Release_OnSite_10.3.3_2024.04.17-01) 10.3.0.0 10.3.3.617 Release_OnSite_10.3.3_2024.04.17-01 Default ACRMWEB02 NetServer        TrayAppServer.Execute implementation failed SuperOffice.TrayApp.TrayApp2.GetAlarmsRequest DH (1993) - Authorized (Employee)Gebruikersniveau 0+:  MSSQL - 12 \\ACRMSQL10\SuperOffice_AllCRM (crm_AllCRM), Database serial #: 1501235947, Database Expiration Date: Friday, July 12, 2024 ACRMSQL10 SuperOffice_AllCRM 1501235947 SuperOffice 10.3.3 NetServer 10.3 Release (Build: Release_OnSite_10.3.3_2024.04.17-01) 10.3.0.0 10.3.3.617 Release_OnSite_10.3.3_2024.04.17-01 Default ACRMWEB02 NetServer Response status code does not indicate success: 502 (Bad Gateway).    at System.Net.Http.HttpResponseMessage.EnsureSuccessStatusCode()    at SuperOffice.Util.HttpHelper.GetObjectFromHttpSyncWithContent[T](String url, HttpServiceJwtConfig config, RequestType requestType, HttpContent content)    at SuperOffice.DCF.Web.WebTools.WebToolsVersionService.GetVersionResponse(String clientVersion)    at SuperOffice.TrayApp.Server.TrayAppServer.ApplyVersioningRules[TResponse,TRequest](TResponse response, TRequest request)    at SuperOffice.TrayApp.Server.TrayAppServer.Execute[TRequest,TResponse](TRequest request, OnExecute`2 implementation) System.Net.Http           Exception Message:Response status code does not indicate success: 502 (Bad Gateway).       Exception Source:System.Net.Http       Exception Target:System.Net.Http.HttpResponseMessage EnsureSuccessStatusCode()          at System.Net.Http.HttpResponseMessage.EnsureSuccessStatusCode()          at SuperOffice.Util.HttpHelper.GetObjectFromHttpSyncWithContent[T](String url, HttpServiceJwtConfig config, RequestType requestType, HttpContent content)          at SuperOffice.DCF.Web.WebTools.WebToolsVersionService.GetVersionResponse(String clientVersion)          at SuperOffice.TrayApp.Server.TrayAppServer.ApplyVersioningRules[TResponse,TRequest](TResponse response, TRequest request)          at SuperOffice.TrayApp.Server.TrayAppServer.Execute[TRequest,TResponse](TRequest request, OnExecute`2 implementation)   The download service is offline, so i guess that is the underyling issue (https://www3-superoffice-com.azurewebsites.net/DownloadService/) WebTools should still work when this isn't available... SuperOffice Version: SuperOffice CRM OnSite 10.3 Release_OnSite_10.3.3_2024.04.17-01 WebTools version:   
David Hollegien
1
2
30 Apr 2024 | 07:05 AM
Topic:
Online development and web service API's

Last reply

We just noticed again that the download service was offline, causing auto login for onsite customers and downloading of documents from SuperOffice Online using webtools to fail (502 bad gateway response) The download service shouldnt be a critical dependency for these actions in my opinion...
by David Hollegien
16 Sep 2024 | 02:55 PM
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
44
23 May 2024 | 08:04 AM
Topic:
Service and CRMScript Discussion

Last reply

Hi David, We have made some additional improvements when it comes to reserved keywords in coming release (10.3.10). Thank you for pointing this out.
by Michel Krohn-Dale
11 Sep 2024 | 11:12 AM
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
5
4 Sep 2024 | 12:22 PM
Topic:
Online development and web service API's

Last reply

Public now and marked as fixed for 10.3.9. Can confirm it is fixed in my SOD tenant.
by David Hollegien
10 Sep 2024 | 12:14 PM
push_pin lock

Bug in trigger script for projectmember before and after save ?

It looks like it only triggers when you try to register new project members.  If I try to update an exisiting member it will not trigger. I've tried this in V10.3.3 online and in V10.3.4 SOD. Can be tested by writing ed.getInputValues() to log.

UT

Ummair Tahir
3
2
11 Apr 2024 | 10:31 AM
Topic:
Service and CRMScript Discussion

Last reply

I dont understand why this is not fixed. It was reported almost a year ago. There are several situations when we want to validate the Projectmember-data - and that is not possible when the trigger is not run... 
by Atle Bjerck
10 Sep 2024 | 07:33 AM
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
2
1
6 Sep 2024 | 11:59 AM
Topic:
Service and CRMScript Discussion

Last reply

Hi, If you post the same request using CRMScript to 'https://httpbin.org/post', do you also get an error then?  
by David Hollegien
9 Sep 2024 | 01:43 PM
push_pin lock

Load in last active tab in old service

I was wondering if it´s possible to make the user stay on the current tab in viewTicket when you update status/owner. Now for example, when you stay in the details tab and update the ticket status does the page reload and placing you back to the Messages tab. 

FL

Fredrik Larsson
1
0
9 Sep 2024 | 10:22 AM
Topic:
Service and CRMScript Discussion