Some PDIs are currently unavailable, and PDI actions are paused. View the latest updates here. Read More

How to interact with Service suscriptions by company with a Maintian item

Cristina Esteve
Tera Contributor

Hi colleagues,

 

I am trying to set a maintain item that users are able to select the service offerings that their company is subscribed.

 

I have tried by selecting the service_offering list, but is not showing all the services.

 

I have done this:

 

- Type: reference

- Table: service_offering

- Advanced reference qualifier:

javascript:
var behalf = current.variables.behalf;
var company_logged = current.variables.company_logged;
var company_customer = current.variables.company_customer;
var company_behalf = current.variables.company_behalf;

if (behalf == 'No') {
if (company_logged == 'f66b14e1c611227b0166c3a0df4046ff') {
'operational_status=1^company=' + company_logged;
} else {
'operational_status=1^company=' + company_customer;
}} else {
'operational_status=1^company=' + company_behalf;
}

 

This is working perfect, but when I select the table service_suscribe_company, the search doesn't work.

 

Am I doing the correct search? do I need to look for different thing than company?

1 ACCEPTED SOLUTION

Kieran Anson
Kilo Patron

Hi,

When you change to the service_suscribe_company, you'll need to dot-walk to the fields you're filtering on.

 

var behalf = current.variables.behalf;
var company_logged = current.variables.company_logged;
var company_customer = current.variables.company_customer;
var company_behalf = current.variables.company_behalf;

if (behalf == 'No') {
if (company_logged == 'f66b14e1c611227b0166c3a0df4046ff') {
'service_offering.operational_status=1^core_company=' + company_logged;
} else {
'service_offering.operational_status=1^core_company=' + company_customer;
}} else {
'service_offering.operational_status=1^core_company=' + company_behalf;
}

 

View solution in original post

4 REPLIES 4

Kieran Anson
Kilo Patron

Hi,

When you change to the service_suscribe_company, you'll need to dot-walk to the fields you're filtering on.

 

var behalf = current.variables.behalf;
var company_logged = current.variables.company_logged;
var company_customer = current.variables.company_customer;
var company_behalf = current.variables.company_behalf;

if (behalf == 'No') {
if (company_logged == 'f66b14e1c611227b0166c3a0df4046ff') {
'service_offering.operational_status=1^core_company=' + company_logged;
} else {
'service_offering.operational_status=1^core_company=' + company_customer;
}} else {
'service_offering.operational_status=1^core_company=' + company_behalf;
}

 

Great1 it is working now, but it is showing the account code, there is a way I have the name?

Many many thanks!

 

Maybe a lookup select box, right?

 

Just for confirmation, it worked with the lookup select box! Many thanks!