Questions and discussion about developing processes and programming in PHP, JavaScript, web services & REST API.
Forum rules: Please search to see if a question has already asked before creating a new topic. Please don't post the same question in multiple forums.
#814538
hi

When using WSDL to call "executeTrigger", the @@USER_LOGGED system variable value is not correct.

First I send login soap request and receive a session id . Then I use that session ID to call executeTrigger . But inside the trigger the value of the @@USER_LOGGED system variable is not the ID of the user I used to authenticate.

thank you for helping me

regards
#814560
System variables such as @@USER_LOGGED, @@TASK and @@INDEX will still be set to the last value they were set to in the case and may not reflect the current state of the case when executed by the executeTrigger() web service.

Do you want the ID of the user who is logged in using Web Services in your trigger? If so, then you need to use sendVariables() to send it as a variable to the case. Use that variable in your trigger, which is executed by executeTrigger().

For example, if you have this trigger code:
Code: Select all
$currentUserId = !empty(@@userId) ? @@userId : @@USER_LOGGED;

//do something with $currentUserId

//then get rid of @@userId:
unset(@@userId);
First, use the sendVariables() web service to set the value of the "userId" variable in the case . Then call the executeTrigger() web service.

Try the CloudMigration PST Converter to convert […]

In the rapidly evolving world of online sports be[…]

STEPN integrates social networking and games that […]

Cenforce 150 is a medication used to cope with a c[…]