Query API problems

Posted by adrien on 13-Aug-2014 10:43

hello,

  I create trigger with a this query:

var res = rbv_api.selectQuery("SELECT language,id,R12756,manager_id FROM USER Where id='19995'", 1);

in adminstrateur user this trigger work perfectly

but in other user  the res.length is always = 0.

I have check all checkbox in permission (api and role) .

I don't understand why?

  

All Replies

Posted by pvorobie on 13-Aug-2014 11:18

Please make sure that current user (or Query API role) has permission to view USER records.

Posted by adrien on 13-Aug-2014 11:26

in role permission of my user Users section have all checked, in quert api role User serction All checked,

i have forgottend something?

Posted by Orchid Corpin on 13-Aug-2014 11:34

Hi adrien,

Can you see the Object Attributes of user object if the Organization was checked?
If you are not using Organization Management app try to uncheck that attribute.

Regards,
Orchid

Posted by adrien on 13-Aug-2014 11:38

In my user attribut Organization Management is check , i uncheck this , but i have same result

Posted by Orchid Corpin on 13-Aug-2014 11:49

Hi adrien,

Have you run the trigger after unchecking the Organization attribute?

Regards,
Orchid

Posted by adrien on 14-Aug-2014 02:42

I try it , but in adminitrator role is work , but when a create a new record , my trigger don't work because my query return 0 record.

Posted by Anoop Premachandran on 14-Aug-2014 02:58

Is this a delayed trigger ?

Posted by adrien on 14-Aug-2014 03:06

no

Posted by Sharavan Kumar on 14-Aug-2014 07:02

Hi adrien,

I have verified this scenario and RB 3.0 and and it worked fine for me

I belive this issue is fixed in RB 3.0 which will be available soon.

steps followed :

1.logged in as FIrst admin in rollbase private cloud

2.Created an application and objects

3. Created an after update object script trigger , used selectquery() API in it

4. Verified that trigger worked for administrator user

5. Create a custom role 'test' and assigned this role to the application created above. (in object definition marked all query api permissions on this object and gave alll permissions to this role )

6. created a user 'A' and assigned the role 'test'

7. login as user 'A' and observer the application is accessiable to this user

8. Create and update a record and observe that Trigger get executed successfully.

please let me know if this the correct scenario that your trying to do.

Thanks,

Sharavan

Posted by adrien on 14-Aug-2014 08:47

Yes is correct scenario , but have try a slectquery on USER ? or other object? because for other object is work just USER return nothing. it's work for admin role

Posted by adrien on 14-Aug-2014 09:54

I try with getfieldvalue is work , i thinks is a another bug, i wait Rollbase 3.0 for testing this issue

Posted by pvorobie on 14-Aug-2014 10:36

Please try using "Test Query" Debugger (use button next to "Debug Formula"

Posted by nidk on 14-Aug-2014 12:40

in admin is work , in other role use how to debug?

Posted by pvorobie on 14-Aug-2014 14:05

Good point. Perhaps we should enhance Debuggers and run them as different user.

Posted by pvorobie on 14-Aug-2014 14:11

Do you use LDF permissions for your User Object (this is by default)?

Posted by smartsysISV on 18-Aug-2014 11:46

Yes, I think you should enhance debuggers....

This thread is closed