Integrated Application Platform › Forums › General › Access from KeyControl
- This topic has 4 replies, 2 voices, and was last updated 8 years, 9 months ago by
ajith.
-
AuthorPosts
-
July 31, 2014 at 5:48 pm #777
ajith
ParticipantHi,
I tried to bring up an Access from KeyControl using its access: option.
My field that uses the KeyCOntrol is coded as
Field_string
{
Prompt: "Company CIN"
Control: (Key 'StkCompany' field: "sC_CIN" access: 'StockCompanyAccessControl' width:12.7 status: "Select the company")
}
and the AccessControl that is called as
Controller
{
Controls:
(Access
'StkCompany'
(Center
....................
validField: 'validmain'
protectField: 'protectmain'
title: "Company Information"
)}When I click the Acccess buton in the key control, I get a message: “AccessPermisssions build_path failed for: StockCompanyAccessControl”.
Once I say OK to the message, I get an error – “query: nonexistent table: ETA”.If I comment out the lines
//if false isnt rec = QueryFirst(BookOptionQuery('ETA', access))
// book_option = rec.path $ '/' $ rec.nameof AccessGoTo, the AccessControl pops up.
1) Am I missing something?
2) What is the meaning of the first message?
3) What is the purpose of the two lines that I commented out?
4) How can I remove the help button in the Access?Thanks in advance,
ajithAugust 11, 2014 at 8:17 pm #1057j_ferguson
Moderator1) Am I missing something?
No, I don’t think so. Are you trying to use the Accounting application (Accountinglib) because that would explain the reference to the ETA book.
2) What is the meaning of the first message?
It is trying to build the path in the book to the option that you are trying to access. Are you using a BookControl to run your application? This message is only a notification to the programmer that a link could not be made to a book page to associate permissions with. If you don’t use permissions in your application, you should just be able to set Suneido.User and you wont get those messages.
3) What is the purpose of the two lines that I commented out?
It is trying to find the correct book page option to find out if the current user has permission to that book page.
4) How can I remove the help button in the Access?
I think that button is from a plugin defined in Plugin_TitleButtons
August 12, 2014 at 7:40 am #1058ajith
ParticipantHi Jeff,
>>>
Are you trying to use the Accounting application (Accountinglib) because that would explain the reference to the ETA book.
>>>No. The message is coming from AccessGoTo
>>>
It is trying to build the path in the book to the option that you are trying to access.
>>>
>>>
It is trying to find the correct book page option to find out if the current user has permission to that book page.
>>>So this part of the code should be executed only if the KeyControl is called from a book? So, it has to check if the keyCOntrol was called from a book. How to do that?
>>>
I think that button is from a plugin defined in Plugin_TitleButtons
>>>Will find that out.
Thanks for the reply,
ajithAugust 12, 2014 at 3:10 pm #1059j_ferguson
ModeratorIt looks like AccessGoTo does not reference the “ETA” book directly anymore (which it shouldn’t). You must be running an older version. You could try downloading the latest version of Suneido, or just keep those lines commented I guess.
August 12, 2014 at 4:57 pm #1060ajith
ParticipantHello,
Sorry for that. Yes, mine is an old version. Don’t know how I did not notice it till now.
However, the AccessGoTo still gives an error – “uninitialised member- Suneido.CurrentBook from the lineif false isnt rec = QueryFirst(BookOptionQuery(Suneido.CurrentBook, access))"
I have changed the line to
if ( Suneido.Member?("CurrentBook") and false isnt rec = QueryFirst(BookOptionQuery(Suneido.CurrentBook, access)))
Thanks for the help,
ajith -
AuthorPosts
- You must be logged in to reply to this topic.