Skip to main content
Question

Client script - how to trace where getuserinfo data reside

  • 16 May 2024
  • 2 replies
  • 21 views

When we change a technician’s truck in their PERSON record/Place for Stock, the PERSON_PLACE sync rules sends the update truck change to mobile within an hour.  However many screens continue showing the old truck value until the mobile user initializes.

This is because these screens have client refresh scripts that populate fields from e.g. var Tech_Truck_Place = getUserInfo('StockFromPlace');

How can I update that getuserinfo data on mobile without having to initialize the phone.

2 replies

Userlevel 3
Badge +7

Hi @Jacksonc 
"getUserInfo" function returns user details. After initializing the mobile, the User object contains values according to the initialized person.


following query use to return data from getUserInfo('StockFromPlace') function.

select distinct place_id from person_place where place_relationship='FOR_STOCK' and person_id='ADMIN'"

 

Use this query to get data for Tech_Truck_Place variable by changing person_id.

Thanks

Badge +4

Thanks Shalikakk,

Yeah, i was afraid I might have to change the queries as you suggest above.  I had hoped to avoid that because the ‘getuserinfo’ function is used in so many of our script, but it sounds like that might be the best approach.

Reply