✨ Community just got smarter! Our all-new AI search is live! ask anything in the search bar, get instant answers.

Application Programming Interface forums

0 Prenumeranter

3 Ämnen

4992 Samtal

Area for questions and answers about SuperOffice API's.

All conversations (4992)

done
Answered
push_pin lock

Scheduled task started at wrong time

Hi, In our Service Module each Ticket we worked is also Billing to our Customer will be billed til end of the Month. We have scheduled Tasks in week Inteval and startet in all 7 days (that manins daily Jobs), in Scripts it will be checked if current Date is End of the month, then run the logic to create a couple of Tickets for Partial invoicing to our Cutomer for the Tickets running over more Months, means, if the original Tickets till End of Month not be closed then transfer its Working time (UDF) as Billing amount to the new closed Tickets for the Partial invoicing and set it to zero in original Ticket where our User go on working till anytime it will be finally closed. To limit the runtime < 60 Sec., i have implemented the Scripts in 3 Scripts, in Logic I allocated to create new tickets for Partial invoicing by created date of the original tickets, then  start three jobs for each Scripts at  diff. Time 22:05/22:25/22:45 each with less Runtime, see below green marked Jobs. Here one Jobs in Details: The three Jobs works till now fine started correctly at diff. planed Time 22:05, 22:25, 22:45 for several Monthes, but on Apr. 30th all three jobs were started from 01:00, Date is correct, but started 21h earlier as planed, so our User missed during this day to check his Tickets which in the Evening will be partially invoiced. See here new Tickets automatically created from jobs at incorrect time. The Question is, how could we or SuperOffice make sure that all planed Jobs started at corrrect Time. We have asked our local SO Support Teams, but no Feedbacks. Thanks!  
Jianchun You
1
0
6 h, 58 m sedan | 08:42 fm
Ämne:
Service and CRMScript Discussion
done
Answered
push_pin lock

message_header.type field

Hi, I am doing some scripting which queries the message_header table via a search engine, to basically check if a request has sent/recieved messages to/from specific email addresses. But there is a field in the message_header table called "Type". SuperOffice Docs (https://docs.superoffice.com/en/database/tables/message-header.html) details this field as below. type The type for this header entry. type ● But there is no explantion on what type options there are.  From what I have found looking at existing data, this appears to be either 1 or 2, but what is the difference, and is the type something I need to be considering, when querying this table via scripting. Many thanks, Trevor
Trevor Sharp
2
2
29. apr. 2026 | 04:20 em
Ämne:
Service and CRMScript Discussion

Senaste svar

Hi Sverre, Indeed, it has been a long time, I hope you are doing well.  Thanks for clarifiying this, this kind of makes sense now, every email I send via a CRM Script sets the value to 2, whereas general replies to requests are all set to 1. Thanks again, Trevor
by Trevor Sharp
30. apr. 2026 | 08:25 fm
done
Answered
push_pin lock

Using VBA in Super Office and access to internal database?

Hi all, Is it possible to use VBA in Super Office to query our own database to retrieve data? Does Super Office allow access to that?   Thank you.   Regards

CB

Christian Behrendt
2
1
1. apr. 2026 | 11:30 fm
Ämne:
Application Programming Interface forums

Senaste svar

Hi Tony. Thanks for your reply. We use the online version of Super Office. We use message templates for newsletters and want to automate more the work, hence, using our internal database to retrieve the text and have them populated automatically in the template in Super Office. Would that be possible? Regards Christian

CB

by Christian Behrendt
2. apr. 2026 | 09:14 fm
done
Answered
push_pin lock

Basic scripts dont seem to run as a button, trigger or task item for onsite 10.5.4 but fire in the edit script area - getEventData does not seem to work with OnSite at all

Hi All, I need to create a script for an onsite client as part of a move to online, my recently learnt basic scripting seems to be going no where. I'm using the same script logic that works on all the online tenents but nothing not even a company.load seems to work onprem.  Can anyone see what I'm missing from the below ? Does anyone else find that getEventData brings back nothing for OnPrem CRM ? I get "something went wrong" on more than one Onprem site even with a basic company.load. I cant seem to get anywhere - thanks for your help :-)  
Dave Walsh
2
2
31. mars 2026 | 09:52 fm
Ämne:
Service and CRMScript Discussion

Senaste svar

Perfect! Happy that it helped :-) It is a bit strange, and not always easy to find out. Some scripts work but not others. Kudos also goes to @David Hollegien, that helped me with this type of strange error some year ago. (that time it was the REST API.s not working correct if the Symetric Keys/secrets did not match)
by Anders Larsson
31. mars 2026 | 12:04 em
done
Answered
push_pin lock

Custom Objects Script - How to load the current y_table ID

When I use the below script as a trigger "after saving custom object" how do I call the current open custom object record. I have tried SearchEngine, GetCurrent, EventData URL, ExtraTable Getvalue "ID", GetInputvalue and loads more but just cant find any working sample! How to you call current open Custom Object Record and Current Company Card from a Button Script & Trigger. My Script code is below the screenshots. Any help would be greatly apreciated, I have a Test Environment setup and I believe if the client sees this working they will Migrate to online :-)             ____ //Script I'm Using   #setLanguageLevel 4; //Things TeamProject do to the Custom Objects Table ExtraTable e = getExtraTable("y_membership_db");   //  Load the record custom object no ID 82 Bool ok = e.load(82);     // Convert values to numbers correctly   Integer suma = e.getValue("x_direct_debit_amount").toInteger();   Integer sumb = e.getValue("x_arrears").toInteger();   Integer total = suma + sumb;     print(" - Old DD Amount = " + suma.toString());   print(" - Current Arrears = " + sumb.toString());   print(" - Calculated Total =  " + total.toString());     //  Save new total which is the VFI DD + arrears value   e.setValue("x_direct_debit_amount", total.toString());   e.setValue("x_membership_category", "Member");   e.save(); // When testing as a Screen Designer Button show this results   print(" - New DD Amount = " + e.getValue("x_direct_debit_amount"));   print(" - Company Link = " + e.getValue("x_pub_card_link"));   print(" - Member Contract ID = " + e.getValue("id"));   print(" - Membership Contract Status = " + e.getValue("x_membership_category"));   // Use the link in custom objects to connect to company card using the contact_id Integer companyId = e.getValue("x_pub_card_link").toInteger();   Company c; c.load(companyId); // When testing as a Screen Designer Button show this results   print(" - Old Membership Status = " + c.getValue("contactCategory"));     // Set the company card to Catergory = "Member" (category id 8)   c.setValue("contactCategory", "8");   c.save(); // When testing as a Screen Designer Button show this results   print(" - Updated Membership Status To Member = " + c.getValue("contactCategory"));   //This lists all the Custom Object fields - - -   // EventData ed = getEventData(); // ed.setNavigateTo("soprotocol:Cust32009/default.aspx?y_membership_db.main.minipreview&y_membership_db_id=74");   // SearchEngine se; // se.addFields("extra_fields", "id,name,field_name,domain,extra_table"); // print(se.executeTextTable());    
Dave Walsh
4
3
23. mars 2026 | 11:34 em
Ämne:
Service and CRMScript Discussion

Senaste svar

Super thanks
by Dave Walsh
24. mars 2026 | 01:17 em
done
Answered
push_pin lock

ArchiveAgent and null values in extra fields

Im trying to find contacts/persons based on an email address, and then I need to check if an extra fields has a value or not. The code below works for all cases except when the x_personid = null, then I get 0 rows, even if there is an email match. I am assuming that this is because there is an inner join somewhere in the backend. Is there a way to change this into a left join? Or do i need to first find the person and then fetch the extra field values?   var columns = new[] { "personId", "personExtra/x_personid"}; ArchiveListItem[] results = await archiveAgent.GetArchiveListByColumnsAsync( "person", columns, [ new ArchiveOrderByInfo() { Name = "personId", Direction = OrderBySortType.ASC } ], [ new ArchiveRestrictionInfo() { Name = "email/emailAddress", Operator = "=", Values = [email], IsActive = true } ], ["person","personExtra"], 0, int.MaxValue);

SG

Snorre Garmann
1
1
18. mars 2026 | 09:31 fm
Ämne:
Online development and web service API's

Senaste svar

Never mind this. I found that i got confused by the fact that the search field in the frontend accepts dots in the email address that the api doesnt. ie per.ulv@acme.com = perulv@acme.com.

SG

by Snorre Garmann
18. mars 2026 | 10:33 fm
done
Answered
push_pin lock

Possible to update the internal note on appointment from imbedded webpanel?

Is it possible to have a webpanel where the user select different settings, and when they press a button on this impedded webpanel, some text is added to the internal note on the appointment the user have open. Simple example 1) Open new appointment 1a) It could be an existing apointment 2) A gui webpanel/web tab on the (now open) appointment show a webpage where the user can select "Option A" or "Option B" 3) User select "Option A" 4) User press a button on the webpage 5) The text "Option A" is now added to the current appointment under "internal note" 6) User press save on the appointment The imbedded webpage is generated via CRMScript (and %EJSCRIPT_START%, %EJSCRIPT_END% posibility)
Morten Larsen
1
0
4. mars 2026 | 01:14 em
Ämne:
Online development and web service API's
done
Answered
push_pin lock

Breaking changes in client libraries

Hi, When trying to upgrade SuperOffice NuGet packages from 11.1 to 11.10 we have found out the following breaking changes: All client methods are now async. For example, in the IListAgent interface there is no GetTicketCategories method any longer, only GetTicketCategoriesAsync. ToServicesXX methods disappeared.We used them to convert SoCore objects like SoCredentials to their version-specific WCF objects. It's possible to fix the async stuff, but what to use instead of ToServicesXX methods?  
Dmitry Kuskov
2
3
22. feb. 2026 | 07:50 fm
Ämne:
Online development and web service API's

Senaste svar

Hi Dmitry Kuskov , Thank you for reporting this issue, and we have discovered why this happened. Here is a download link to obtain the SuperOffice.Services.WcfProxy.dll for 11.6.1004 . We have corrected for the next onsite release.
by Tony Yates
24. feb. 2026 | 09:19 fm
done
Answered
push_pin lock

exe-extensions for old Service no longer available in Online?

Hi, it seems like Service links that use exe-extension has stopped working, and require using .fcgi. Is this an intentional change in latest version? Both have worked fine until now. If we navigate to f.instance https://online2.superoffice.com/Cust25790/CS/scripts/customer.exe we now get an "Unhandled exception".  
Frode Lillerud
3
2
20. feb. 2026 | 08:18 fm
Ämne:
Service and CRMScript Discussion

Senaste svar

https://status.superoffice.com/incidents/s80kbz0024d7
by Margrethe Romnes
20. feb. 2026 | 12:44 em
done
Answered
push_pin lock

Get email body in CRMScript?

I am trying to create a script that gets the body of archived emails that are visible to all users under a company in so, but I realised that the db table email_item is protected. Is there any way for me to gain access to the email bodies? 
Beata Martinsson
2
1
16. feb. 2026 | 04:33 em
Ämne:
Service and CRMScript Discussion

Senaste svar

The email_item table is used by the internal inbox functionality, it contains the emails that are directly taken from a specific users inbox, not only the one's an user archived in SuperOffice. Because of that, this table is indeed protected from searching (and propably because it can be a very large table). SuperOffice does not store the content of archived emails/documents in the database, but in the external document archive, which in Online can be either Azure blob storage or Microsoft 365 sharepoint. It isn't possible to query this storage directly to get the email body's.
by David Hollegien
17. feb. 2026 | 09:51 fm