Skip to main content
Solved

Custom Screen Not Working in FSM Web Client After Update from 6u7 to 6u25


Dear FSM experts,

 

One of our customers is currently experiencing the following issue, and I would appreciate your assistance.

We created a custom screen for the web client and tested it with version 6u7 before updating it to version 6u25. It worked correctly as expected. Recently, they updated the FSM environment from version 6u7 to 6u25. Since the update, they have identified that the custom screen is not functioning properly. 

 

Custom Screen 

 

Error 

 

 

Client Script for Web Client 

var sellerPlaceID = getControlValue('sp_coo_data','seller_place_id');
var purchaserPlaceID = getControlValue('sp_coo_data','purchaser_place_id');

var sellerPlaceIDFromDB = getDBValue('C_GET_PLACE_ID',sellerPlaceID);
var purchaserPlaceIDFromDB = getDBValue('C_GET_PLACE_ID',purchaserPlaceID);


var whos_place;
var status;

if(isNullOrEmptyString(sellerPlaceIDFromDB) && whos_place != "CUST" && status != "A")
{

alert("Please enter valid Seller Place ID");
return false;

}

if(isNullOrEmptyString(purchaserPlaceIDFromDB) && whos_place != "CUST" && status != "A")
{

alert("Please enter valid Purchaser Place ID");
return false;

}

 

Does anyone have any idea about the possible reasons for this issue?


Thanks & Best Regards,
Amandi Soysa

4 replies

Userlevel 2
Badge +4

Hi @Amandi ,

 

As I can remember the client script function ‘GetDbValue’ is not supported in web client (depreciated).

So, you will have to use ‘GetDbValues’ function to handle functionality of the above script 

 

Badge +2

Hi @IniNimesK ,

 

Thanks for the response. I revised the script as you suggested. However, I'm now receiving this alert even though the correct Seller Place ID and Purchaser Place ID are provided.

Note: Before updating to version 6u25, it worked correctly as expected with version 6u7.

 

 Error 

 

 

Revised Client Script

var sellerPlaceID = getControlValue('sp_coo_data','seller_place_id');
var purchaserPlaceID = getControlValue('sp_coo_data','purchaser_place_id');

var sellerPlaceIDFromDB = getDBValues('C_GET_PLACE_ID',sellerPlaceID);
var purchaserPlaceIDFromDB = getDBValues('C_GET_PLACE_ID',purchaserPlaceID);


var whos_place;
var status;

if(isNullOrEmptyString(sellerPlaceIDFromDB) && whos_place != "CUST" && status != "A")
{

alert("Please enter valid Seller Place ID");
return false;

}

if(isNullOrEmptyString(purchaserPlaceIDFromDB) && whos_place != "CUST" && status != "A")
{

alert("Please enter valid Purchaser Place ID");
return false;

}



Thanks & Best Regards,
Amandi Soysa

Userlevel 2
Badge +4

@Amandi,

The return type of the getDBValues will be an array, so you will need to address it by index.

//Assuming only required row is the 1st record
var sellerPlaceIDFromDB = getDBValues('C_GET_PLACE_ID',sellerPlaceID)[0];
var purchaserPlaceIDFromDB = getDBValues('C_GET_PLACE_ID',purchaserPlaceID)[0];

var sellerPlaceIDFromDBVal = sellerPlaceIDFromDB.YOUR_FIELD_NAME;
var purchaserPlaceIDFromDBVal = purchaserPlaceIDFromDB.YOUR_OTHER_FIELD_NAME;

Can you try something like above and see if it behaves as expected

Badge +2

Hi @IniNimesK,

 

Thank you very much for your response. I was able to resolve the issue by implementing the changes you suggested.

 

Best Regards,

Amandi Soysa

Reply