Read customer context from environment in online

Hello,

Is their someway to reliably read the customer context (CustXXXXX) from the customer using CRMScript?

We thought of a few options ourself:

  • Extract it from the cgi_bin part of the config table
    • Not very reliable, subject to changes by SuperOffice in the further
  • Use the NSDocumentAgent and get it using the SubstituteTemplateVariables (variable uctx)
    • Requires a netserver call

Any other way to do this reliably? We already looked in the global variables etc of CRMScript but it isn't registered in there.

 

RE: Read customer context from environment in online

I mean, would something like this work?

print(getProgramTicket().after(".com/").until("/"));
Av: Simen Mostuen Iversen 6. maj 2020

RE: Read customer context from environment in online

Hello Simen,

That seems like pretty reliable way to get the customer context, will use that for now.

Thanks!

Av: David Hollegien 6. maj 2020