Adding Palette Items in GP 7.5

I have been having trouble in Dexterity adding palette items.  Our product 
used to only use toolbar items, but we were hoping to add a palette item. 
When we struggled with this about a year ago, the support technition had me 
run the add toolbar script off of a trigger on the OK button on the 
User/Company login screen.  That same script I am using to add to the tool 
bar(basically the script goes though the toolbar items in SY_Toolbar_MSTR, 
if it finds the item i am trying to add it does nothing, if it doesnt find 
it, it adds it on the end) i am not making a call to a global script called 
AddPaletteItem (effectively does the same thing as the add tool bar except 
it use the SY_Palette_MSTR).  While the AddToolbarItem works, the 
AddPaletteItem (on the save table command) has an err() of 0 but doesnt 
update the database.  In debug mode, it crashes Dexterity saying that it 
cant find the table .SY00200 (which is the SY_Palette_MSTR table, but i am 
troubled by the "." before the table name) and when i turn it into a chunk 
file and popup warning messages around what i am doing, it succeeds with the 
err() being 0 after the save table command.  I just have no clue what is 
going on.  Is the problem where i am trying to access a company table?  Is 
it because my focus trigger is TRIGGER_BEFORE_ORIGINAL on the OK button? 
What else can I do to figure out my problem.

On another note, I was unable to delete from the SY_Toolbar_MSTR table at 
this same point in time.  I had to use pass through SQL and restrict my 
product to SQL only users.  I would rather not do this, but it wont unlock 
the table. 



0
10/19/2004 9:42:44 PM
greatplains 29623 articles. 5 followers. Follow

8 Replies
602 Views

Similar Articles

[PageSpeed] 25

Matt

First point..... Please do not use a trigger on the OK button of the Switch 
Company form to run code after logging in.  The issue is that this code will 
attempt to run regardless of which the login attempt was successful and so 
will attempt to access tables etc before a connection to SQL is made. This 
results in Dexterity's login dialog showing and eventually a script 
exception. 

Instead use a procedure trigger on the Add_Successful_Login_Record global 
procedure.  If you want to run code when logging out, trigger on 
Add_Successful_Logout_Record.

To add Palette items you can simply call Add_Palette_Selection global 
procedure from your trigger on login.  Even better, check that all your 
tables have been created first and only add your toolbar or palette entries 
if the tables are ready.

You can also just write your own code to update the SY_Toolbar_MSTR and 
SY_Palette_MSTR tables directly.  I did this as my code checks to see if the 
entries are already there to prevent adding twice. They also have the ability 
to remove any entries I add (and cleanup the sequence numbers rather than 
leave a hole). Another useful bit of feature of the code I wrote is that they 
will automatically update the dictionary IDs depending on whether I am in 
Test mode or runtime mode.  Hence my menus always work while I am developing.

One last point.... as your trigger is currently running before the OK 
button, it will be running before logging into the company.  You will be able 
to access the System database and so SY_Toolbar_MSTR, but not the company 
database or SY_Palette_MSTR table.

Hope this helps.

David Musgrave
Senior Development Consultant
MBS Services - Asia Pacific

Microsoft Business Solutions
http://www.microsoft.com/BusinessSolutions

mailto:dmusgrav@nospam-microsoft.com

Any views contained within are my personal views and 
not necessarily Microsoft Business Solutions policy.
This posting is provided "AS IS" with no warranties, 
and confers no rights.  



"Matt" wrote:

> I have been having trouble in Dexterity adding palette items.  Our product 
> used to only use toolbar items, but we were hoping to add a palette item. 
> When we struggled with this about a year ago, the support technition had me 
> run the add toolbar script off of a trigger on the OK button on the 
> User/Company login screen.  That same script I am using to add to the tool 
> bar(basically the script goes though the toolbar items in SY_Toolbar_MSTR, 
> if it finds the item i am trying to add it does nothing, if it doesnt find 
> it, it adds it on the end) i am not making a call to a global script called 
> AddPaletteItem (effectively does the same thing as the add tool bar except 
> it use the SY_Palette_MSTR).  While the AddToolbarItem works, the 
> AddPaletteItem (on the save table command) has an err() of 0 but doesnt 
> update the database.  In debug mode, it crashes Dexterity saying that it 
> cant find the table .SY00200 (which is the SY_Palette_MSTR table, but i am 
> troubled by the "." before the table name) and when i turn it into a chunk 
> file and popup warning messages around what i am doing, it succeeds with the 
> err() being 0 after the save table command.  I just have no clue what is 
> going on.  Is the problem where i am trying to access a company table?  Is 
> it because my focus trigger is TRIGGER_BEFORE_ORIGINAL on the OK button? 
> What else can I do to figure out my problem.
> 
> On another note, I was unable to delete from the SY_Toolbar_MSTR table at 
> this same point in time.  I had to use pass through SQL and restrict my 
> product to SQL only users.  I would rather not do this, but it wont unlock 
> the table. 
> 
> 
> 
> 
0
dmusgrav (157)
10/20/2004 12:39:03 AM
David,

Thank you so much for the advice, however I couldn't quite get everything to 
work.  I switched my trigger to use Add_Successful_Login_Record.  It is 
firing, but the Add_Palette_Selection is still not adding the palette items. 
I am trying to add two palette items to two different palettes

local integer seq;
call Add_Palette_Selection, 199, "Prompt1", "Command1", seq, true, table 
SY_Palette_MSTR, 681;
call Add_Palette_Selection, 197, "Prompt2", "Command2", seq, true, table 
SY_Palette_MSTR, 681;

I tried it with and without my dictionary id.  The seq number returned after 
the first call is 1, after the second, it is 2.  No palette items show up on 
the palettes (Routines > Payroll and Reports > Payroll respectivley) and 
their are no new entries in the SY00200 table.  Is there anything else I 
should be doing or checking.  No errors are thrown.

Also, in your reply you talked about procedures for SY_Toolbar_MSTR, what 
are the names of procedures that delete and add toolbar items.  I would 
certinaly rather use your global procedures in place of my procs.

Thanks,
Matt


"David Musgrave" <dmusgrav@nospam-microsoft.com> wrote in message 
news:0FB57840-F308-4EE0-BBFC-FE1808276C8C@microsoft.com...
> Matt
>
> First point..... Please do not use a trigger on the OK button of the 
> Switch
> Company form to run code after logging in.  The issue is that this code 
> will
> attempt to run regardless of which the login attempt was successful and so
> will attempt to access tables etc before a connection to SQL is made. This
> results in Dexterity's login dialog showing and eventually a script
> exception.
>
> Instead use a procedure trigger on the Add_Successful_Login_Record global
> procedure.  If you want to run code when logging out, trigger on
> Add_Successful_Logout_Record.
>
> To add Palette items you can simply call Add_Palette_Selection global
> procedure from your trigger on login.  Even better, check that all your
> tables have been created first and only add your toolbar or palette 
> entries
> if the tables are ready.
>
> You can also just write your own code to update the SY_Toolbar_MSTR and
> SY_Palette_MSTR tables directly.  I did this as my code checks to see if 
> the
> entries are already there to prevent adding twice. They also have the 
> ability
> to remove any entries I add (and cleanup the sequence numbers rather than
> leave a hole). Another useful bit of feature of the code I wrote is that 
> they
> will automatically update the dictionary IDs depending on whether I am in
> Test mode or runtime mode.  Hence my menus always work while I am 
> developing.
>
> One last point.... as your trigger is currently running before the OK
> button, it will be running before logging into the company.  You will be 
> able
> to access the System database and so SY_Toolbar_MSTR, but not the company
> database or SY_Palette_MSTR table.
>
> Hope this helps.
>
> David Musgrave
> Senior Development Consultant
> MBS Services - Asia Pacific
>
> Microsoft Business Solutions
> http://www.microsoft.com/BusinessSolutions
>
> mailto:dmusgrav@nospam-microsoft.com
>
> Any views contained within are my personal views and
> not necessarily Microsoft Business Solutions policy.
> This posting is provided "AS IS" with no warranties,
> and confers no rights.
>
>
>
> "Matt" wrote:
>
>> I have been having trouble in Dexterity adding palette items.  Our 
>> product
>> used to only use toolbar items, but we were hoping to add a palette item.
>> When we struggled with this about a year ago, the support technition had 
>> me
>> run the add toolbar script off of a trigger on the OK button on the
>> User/Company login screen.  That same script I am using to add to the 
>> tool
>> bar(basically the script goes though the toolbar items in 
>> SY_Toolbar_MSTR,
>> if it finds the item i am trying to add it does nothing, if it doesnt 
>> find
>> it, it adds it on the end) i am not making a call to a global script 
>> called
>> AddPaletteItem (effectively does the same thing as the add tool bar 
>> except
>> it use the SY_Palette_MSTR).  While the AddToolbarItem works, the
>> AddPaletteItem (on the save table command) has an err() of 0 but doesnt
>> update the database.  In debug mode, it crashes Dexterity saying that it
>> cant find the table .SY00200 (which is the SY_Palette_MSTR table, but i 
>> am
>> troubled by the "." before the table name) and when i turn it into a 
>> chunk
>> file and popup warning messages around what i am doing, it succeeds with 
>> the
>> err() being 0 after the save table command.  I just have no clue what is
>> going on.  Is the problem where i am trying to access a company table? 
>> Is
>> it because my focus trigger is TRIGGER_BEFORE_ORIGINAL on the OK button?
>> What else can I do to figure out my problem.
>>
>> On another note, I was unable to delete from the SY_Toolbar_MSTR table at
>> this same point in time.  I had to use pass through SQL and restrict my
>> product to SQL only users.  I would rather not do this, but it wont 
>> unlock
>> the table.
>>
>>
>>
>>
> 



0
10/20/2004 1:35:30 PM
Matt

I'm sorry, there aren't any built in scripts for manipulating the Toolbar. 
You will need to write into SY_Toolbar_MSTR table yourself. Why don't you 
create a function or procedure that you can call to add your toolbar entries.

For Palettes and the SY_Palette_MSTR table there are two scripts; 
Add_Palette_Selection and Delete_Palette_Selection which you can use.

I have altered your code to not use any hardcoded values or strings. You 
will need to create a constant PROD_ID = 681 and messages 22001 and 22002 for 
your prompts.  I have also added the optional last parameter being the 
dictionary ID for the palette form, in this case DYNAMICS.

I believe the code was failing as you have the boolean value for IN_empty as 
true.  This means that the adding code will believe that the palette is empty 
and will try to start adding at position 1.  This is actually causing a 
duplicate key error, but as there is no check error or other err() checks 
after the save table command, you will not see the error.  Using a value as 
false will add the palette entry to the end, unless it already exists in 
which case it will not be added again.

local integer seq;

call Add_Palette_Selection, Resource_GetID(DYNAMICS, FORMTYPE, 
technicalname(form Transactions_Payroll_Palette)), getmsg(22001){Prompt1}, 
technicalname(form Command1), seq, false, table SY_Palette_MSTR, PROD_ID, 
DYNAMICS;

call Add_Palette_Selection, Resource_GetID(DYNAMICS, FORMTYPE, 
technicalname(form Report_Payroll_Palette)), getmsg(22002){Prompt2}, 
technicalname(form Command2), seq, false, table SY_Palette_MSTR, PROD_ID, 
DYNAMICS;

Please note that in v8.0, the toolbar and palettes have been completely 
removed and replaced with a Command and Menu system.  Full details of how to 
integrate with the v8.0 navigation model is included in the v8.0 integration 
guide manual.

Hope this helps.

David Musgrave
Senior Development Consultant
MBS Services - Asia Pacific

Microsoft Business Solutions
http://www.microsoft.com/BusinessSolutions

mailto:dmusgrav@nospam-microsoft.com

Any views contained within are my personal views and 
not necessarily Microsoft Business Solutions policy.
This posting is provided "AS IS" with no warranties, 
and confers no rights.  


"Matt" wrote:

> David,
> 
> Thank you so much for the advice, however I couldn't quite get everything to 
> work.  I switched my trigger to use Add_Successful_Login_Record.  It is 
> firing, but the Add_Palette_Selection is still not adding the palette items. 
> I am trying to add two palette items to two different palettes
> 
> local integer seq;
> call Add_Palette_Selection, 199, "Prompt1", "Command1", seq, true, table 
> SY_Palette_MSTR, 681;
> call Add_Palette_Selection, 197, "Prompt2", "Command2", seq, true, table 
> SY_Palette_MSTR, 681;
> 
> I tried it with and without my dictionary id.  The seq number returned after 
> the first call is 1, after the second, it is 2.  No palette items show up on 
> the palettes (Routines > Payroll and Reports > Payroll respectivley) and 
> their are no new entries in the SY00200 table.  Is there anything else I 
> should be doing or checking.  No errors are thrown.
> 
> Also, in your reply you talked about procedures for SY_Toolbar_MSTR, what 
> are the names of procedures that delete and add toolbar items.  I would 
> certinaly rather use your global procedures in place of my procs.
> 
> Thanks,
> Matt
> 
> 
> "David Musgrave" <dmusgrav@nospam-microsoft.com> wrote in message 
> news:0FB57840-F308-4EE0-BBFC-FE1808276C8C@microsoft.com...
> > Matt
> >
> > First point..... Please do not use a trigger on the OK button of the 
> > Switch
> > Company form to run code after logging in.  The issue is that this code 
> > will
> > attempt to run regardless of which the login attempt was successful and so
> > will attempt to access tables etc before a connection to SQL is made. This
> > results in Dexterity's login dialog showing and eventually a script
> > exception.
> >
> > Instead use a procedure trigger on the Add_Successful_Login_Record global
> > procedure.  If you want to run code when logging out, trigger on
> > Add_Successful_Logout_Record.
> >
> > To add Palette items you can simply call Add_Palette_Selection global
> > procedure from your trigger on login.  Even better, check that all your
> > tables have been created first and only add your toolbar or palette 
> > entries
> > if the tables are ready.
> >
> > You can also just write your own code to update the SY_Toolbar_MSTR and
> > SY_Palette_MSTR tables directly.  I did this as my code checks to see if 
> > the
> > entries are already there to prevent adding twice. They also have the 
> > ability
> > to remove any entries I add (and cleanup the sequence numbers rather than
> > leave a hole). Another useful bit of feature of the code I wrote is that 
> > they
> > will automatically update the dictionary IDs depending on whether I am in
> > Test mode or runtime mode.  Hence my menus always work while I am 
> > developing.
> >
> > One last point.... as your trigger is currently running before the OK
> > button, it will be running before logging into the company.  You will be 
> > able
> > to access the System database and so SY_Toolbar_MSTR, but not the company
> > database or SY_Palette_MSTR table.
> >
> > Hope this helps.
> >
> > David Musgrave
> > Senior Development Consultant
> > MBS Services - Asia Pacific
> >
> > Microsoft Business Solutions
> > http://www.microsoft.com/BusinessSolutions
> >
> > mailto:dmusgrav@nospam-microsoft.com
> >
> > Any views contained within are my personal views and
> > not necessarily Microsoft Business Solutions policy.
> > This posting is provided "AS IS" with no warranties,
> > and confers no rights.
> >
> >
> >
> > "Matt" wrote:
> >
> >> I have been having trouble in Dexterity adding palette items.  Our 
> >> product
> >> used to only use toolbar items, but we were hoping to add a palette item.
> >> When we struggled with this about a year ago, the support technition had 
> >> me
> >> run the add toolbar script off of a trigger on the OK button on the
> >> User/Company login screen.  That same script I am using to add to the 
> >> tool
> >> bar(basically the script goes though the toolbar items in 
> >> SY_Toolbar_MSTR,
> >> if it finds the item i am trying to add it does nothing, if it doesnt 
> >> find
> >> it, it adds it on the end) i am not making a call to a global script 
> >> called
> >> AddPaletteItem (effectively does the same thing as the add tool bar 
> >> except
> >> it use the SY_Palette_MSTR).  While the AddToolbarItem works, the
> >> AddPaletteItem (on the save table command) has an err() of 0 but doesnt
> >> update the database.  In debug mode, it crashes Dexterity saying that it
> >> cant find the table .SY00200 (which is the SY_Palette_MSTR table, but i 
> >> am
> >> troubled by the "." before the table name) and when i turn it into a 
> >> chunk
> >> file and popup warning messages around what i am doing, it succeeds with 
> >> the
> >> err() being 0 after the save table command.  I just have no clue what is
> >> going on.  Is the problem where i am trying to access a company table? 
> >> Is
> >> it because my focus trigger is TRIGGER_BEFORE_ORIGINAL on the OK button?
> >> What else can I do to figure out my problem.
> >>
> >> On another note, I was unable to delete from the SY_Toolbar_MSTR table at
> >> this same point in time.  I had to use pass through SQL and restrict my
> >> product to SQL only users.  I would rather not do this, but it wont 
> >> unlock
> >> the table.
> >>
> >>
> >>
> >>
> > 
> 
> 
> 
> 
0
dmusgrav (157)
10/20/2004 2:03:01 PM
David,

It still didn't work. I used your code and still no palettes appeared, and 
the database had no new records.  It returned a sequence number of 2 for 
both calls which I thought was odd since both palettes have more than 1 item 
in them.  Is there some code that i could add that would give me a better 
idea of what is failing when it is trying to save?  I looked in the table 
buffer after the call, and the sequence number is 2 and the command prompt 
is what it should be.  Any other suggestions.

Matt


"David Musgrave" <dmusgrav@nospam-microsoft.com> wrote in message 
news:C98038E1-2609-49F4-A3CF-167DBBEE9763@microsoft.com...
> Matt
>
> I'm sorry, there aren't any built in scripts for manipulating the Toolbar.
> You will need to write into SY_Toolbar_MSTR table yourself. Why don't you
> create a function or procedure that you can call to add your toolbar 
> entries.
>
> For Palettes and the SY_Palette_MSTR table there are two scripts;
> Add_Palette_Selection and Delete_Palette_Selection which you can use.
>
> I have altered your code to not use any hardcoded values or strings. You
> will need to create a constant PROD_ID = 681 and messages 22001 and 22002 
> for
> your prompts.  I have also added the optional last parameter being the
> dictionary ID for the palette form, in this case DYNAMICS.
>
> I believe the code was failing as you have the boolean value for IN_empty 
> as
> true.  This means that the adding code will believe that the palette is 
> empty
> and will try to start adding at position 1.  This is actually causing a
> duplicate key error, but as there is no check error or other err() checks
> after the save table command, you will not see the error.  Using a value 
> as
> false will add the palette entry to the end, unless it already exists in
> which case it will not be added again.
>
> local integer seq;
>
> call Add_Palette_Selection, Resource_GetID(DYNAMICS, FORMTYPE,
> technicalname(form Transactions_Payroll_Palette)), getmsg(22001){Prompt1},
> technicalname(form Command1), seq, false, table SY_Palette_MSTR, PROD_ID,
> DYNAMICS;
>
> call Add_Palette_Selection, Resource_GetID(DYNAMICS, FORMTYPE,
> technicalname(form Report_Payroll_Palette)), getmsg(22002){Prompt2},
> technicalname(form Command2), seq, false, table SY_Palette_MSTR, PROD_ID,
> DYNAMICS;
>
> Please note that in v8.0, the toolbar and palettes have been completely
> removed and replaced with a Command and Menu system.  Full details of how 
> to
> integrate with the v8.0 navigation model is included in the v8.0 
> integration
> guide manual.
>
> Hope this helps.
>
> David Musgrave
> Senior Development Consultant
> MBS Services - Asia Pacific
>
> Microsoft Business Solutions
> http://www.microsoft.com/BusinessSolutions
>
> mailto:dmusgrav@nospam-microsoft.com
>
> Any views contained within are my personal views and
> not necessarily Microsoft Business Solutions policy.
> This posting is provided "AS IS" with no warranties,
> and confers no rights.
>
>
> "Matt" wrote:
>
>> David,
>>
>> Thank you so much for the advice, however I couldn't quite get everything 
>> to
>> work.  I switched my trigger to use Add_Successful_Login_Record.  It is
>> firing, but the Add_Palette_Selection is still not adding the palette 
>> items.
>> I am trying to add two palette items to two different palettes
>>
>> local integer seq;
>> call Add_Palette_Selection, 199, "Prompt1", "Command1", seq, true, table
>> SY_Palette_MSTR, 681;
>> call Add_Palette_Selection, 197, "Prompt2", "Command2", seq, true, table
>> SY_Palette_MSTR, 681;
>>
>> I tried it with and without my dictionary id.  The seq number returned 
>> after
>> the first call is 1, after the second, it is 2.  No palette items show up 
>> on
>> the palettes (Routines > Payroll and Reports > Payroll respectivley) and
>> their are no new entries in the SY00200 table.  Is there anything else I
>> should be doing or checking.  No errors are thrown.
>>
>> Also, in your reply you talked about procedures for SY_Toolbar_MSTR, what
>> are the names of procedures that delete and add toolbar items.  I would
>> certinaly rather use your global procedures in place of my procs.
>>
>> Thanks,
>> Matt
>>
>>
>> "David Musgrave" <dmusgrav@nospam-microsoft.com> wrote in message
>> news:0FB57840-F308-4EE0-BBFC-FE1808276C8C@microsoft.com...
>> > Matt
>> >
>> > First point..... Please do not use a trigger on the OK button of the
>> > Switch
>> > Company form to run code after logging in.  The issue is that this code
>> > will
>> > attempt to run regardless of which the login attempt was successful and 
>> > so
>> > will attempt to access tables etc before a connection to SQL is made. 
>> > This
>> > results in Dexterity's login dialog showing and eventually a script
>> > exception.
>> >
>> > Instead use a procedure trigger on the Add_Successful_Login_Record 
>> > global
>> > procedure.  If you want to run code when logging out, trigger on
>> > Add_Successful_Logout_Record.
>> >
>> > To add Palette items you can simply call Add_Palette_Selection global
>> > procedure from your trigger on login.  Even better, check that all your
>> > tables have been created first and only add your toolbar or palette
>> > entries
>> > if the tables are ready.
>> >
>> > You can also just write your own code to update the SY_Toolbar_MSTR and
>> > SY_Palette_MSTR tables directly.  I did this as my code checks to see 
>> > if
>> > the
>> > entries are already there to prevent adding twice. They also have the
>> > ability
>> > to remove any entries I add (and cleanup the sequence numbers rather 
>> > than
>> > leave a hole). Another useful bit of feature of the code I wrote is 
>> > that
>> > they
>> > will automatically update the dictionary IDs depending on whether I am 
>> > in
>> > Test mode or runtime mode.  Hence my menus always work while I am
>> > developing.
>> >
>> > One last point.... as your trigger is currently running before the OK
>> > button, it will be running before logging into the company.  You will 
>> > be
>> > able
>> > to access the System database and so SY_Toolbar_MSTR, but not the 
>> > company
>> > database or SY_Palette_MSTR table.
>> >
>> > Hope this helps.
>> >
>> > David Musgrave
>> > Senior Development Consultant
>> > MBS Services - Asia Pacific
>> >
>> > Microsoft Business Solutions
>> > http://www.microsoft.com/BusinessSolutions
>> >
>> > mailto:dmusgrav@nospam-microsoft.com
>> >
>> > Any views contained within are my personal views and
>> > not necessarily Microsoft Business Solutions policy.
>> > This posting is provided "AS IS" with no warranties,
>> > and confers no rights.
>> >
>> >
>> >
>> > "Matt" wrote:
>> >
>> >> I have been having trouble in Dexterity adding palette items.  Our
>> >> product
>> >> used to only use toolbar items, but we were hoping to add a palette 
>> >> item.
>> >> When we struggled with this about a year ago, the support technition 
>> >> had
>> >> me
>> >> run the add toolbar script off of a trigger on the OK button on the
>> >> User/Company login screen.  That same script I am using to add to the
>> >> tool
>> >> bar(basically the script goes though the toolbar items in
>> >> SY_Toolbar_MSTR,
>> >> if it finds the item i am trying to add it does nothing, if it doesnt
>> >> find
>> >> it, it adds it on the end) i am not making a call to a global script
>> >> called
>> >> AddPaletteItem (effectively does the same thing as the add tool bar
>> >> except
>> >> it use the SY_Palette_MSTR).  While the AddToolbarItem works, the
>> >> AddPaletteItem (on the save table command) has an err() of 0 but 
>> >> doesnt
>> >> update the database.  In debug mode, it crashes Dexterity saying that 
>> >> it
>> >> cant find the table .SY00200 (which is the SY_Palette_MSTR table, but 
>> >> i
>> >> am
>> >> troubled by the "." before the table name) and when i turn it into a
>> >> chunk
>> >> file and popup warning messages around what i am doing, it succeeds 
>> >> with
>> >> the
>> >> err() being 0 after the save table command.  I just have no clue what 
>> >> is
>> >> going on.  Is the problem where i am trying to access a company table?
>> >> Is
>> >> it because my focus trigger is TRIGGER_BEFORE_ORIGINAL on the OK 
>> >> button?
>> >> What else can I do to figure out my problem.
>> >>
>> >> On another note, I was unable to delete from the SY_Toolbar_MSTR table 
>> >> at
>> >> this same point in time.  I had to use pass through SQL and restrict 
>> >> my
>> >> product to SQL only users.  I would rather not do this, but it wont
>> >> unlock
>> >> the table.
>> >>
>> >>
>> >>
>> >>
>> >
>>
>>
>>
>>
> 



0
10/20/2004 3:40:29 PM
Matt

We need some more code..... as we have not limited the table buffer to the 
range for our palette only.


local integer l_seq_number, nPaletteID;
local boolean l_empty;

nPaletteID = Resource_GetID(DYNAMICS,DT_FORM,technicalname(form 
Transactions_Payroll_Palette));

range clear table SY_Palette_MSTR;
clear table SY_Palette_MSTR;
'Language ID' of table SY_Palette_MSTR = 'Language ID' of globals;
'Palette Dictionary ID' of table SY_Palette_MSTR = DYNAMICS;
'PaletteID' of table SY_Palette_MSTR = nPaletteID;
range start table SY_Palette_MSTR;
fill table SY_Palette_MSTR;
'Language ID' of table SY_Palette_MSTR = 'Language ID' of globals;
'Palette Dictionary ID' of table SY_Palette_MSTR = DYNAMICS;
'PaletteID' of table SY_Palette_MSTR = nPaletteID;
range end table SY_Palette_MSTR;

get last table SY_Palette_MSTR;
if err() = EOF then
	l_empty = true;
	l_seq_number = 0;
else
	l_empty = false;
end if;

call Add_Palette_Selection, nPaletteID, getmsg(22001){Prompt1}, 
technicalname(form Command1), seq, l_empty, table SY_Palette_MSTR, PROD_ID, 
DYNAMICS;

Please repeat this entire section of code for palette entry on the other 
palette.

David Musgrave
Senior Development Consultant
MBS Services - Asia Pacific

Microsoft Business Solutions
http://www.microsoft.com/BusinessSolutions

mailto:dmusgrav@nospam-microsoft.com

Any views contained within are my personal views and 
not necessarily Microsoft Business Solutions policy.
This posting is provided "AS IS" with no warranties, 
and confers no rights.  


"Matt" wrote:

> David,
> 
> It still didn't work. I used your code and still no palettes appeared, and 
> the database had no new records.  It returned a sequence number of 2 for 
> both calls which I thought was odd since both palettes have more than 1 item 
> in them.  Is there some code that i could add that would give me a better 
> idea of what is failing when it is trying to save?  I looked in the table 
> buffer after the call, and the sequence number is 2 and the command prompt 
> is what it should be.  Any other suggestions.
> 
> Matt
> 
> 
> "David Musgrave" <dmusgrav@nospam-microsoft.com> wrote in message 
> news:C98038E1-2609-49F4-A3CF-167DBBEE9763@microsoft.com...
> > Matt
> >
> > I'm sorry, there aren't any built in scripts for manipulating the Toolbar.
> > You will need to write into SY_Toolbar_MSTR table yourself. Why don't you
> > create a function or procedure that you can call to add your toolbar 
> > entries.
> >
> > For Palettes and the SY_Palette_MSTR table there are two scripts;
> > Add_Palette_Selection and Delete_Palette_Selection which you can use.
> >
> > I have altered your code to not use any hardcoded values or strings. You
> > will need to create a constant PROD_ID = 681 and messages 22001 and 22002 
> > for
> > your prompts.  I have also added the optional last parameter being the
> > dictionary ID for the palette form, in this case DYNAMICS.
> >
> > I believe the code was failing as you have the boolean value for IN_empty 
> > as
> > true.  This means that the adding code will believe that the palette is 
> > empty
> > and will try to start adding at position 1.  This is actually causing a
> > duplicate key error, but as there is no check error or other err() checks
> > after the save table command, you will not see the error.  Using a value 
> > as
> > false will add the palette entry to the end, unless it already exists in
> > which case it will not be added again.
> >
> > local integer seq;
> >
> > call Add_Palette_Selection, Resource_GetID(DYNAMICS, FORMTYPE,
> > technicalname(form Transactions_Payroll_Palette)), getmsg(22001){Prompt1},
> > technicalname(form Command1), seq, false, table SY_Palette_MSTR, PROD_ID,
> > DYNAMICS;
> >
> > call Add_Palette_Selection, Resource_GetID(DYNAMICS, FORMTYPE,
> > technicalname(form Report_Payroll_Palette)), getmsg(22002){Prompt2},
> > technicalname(form Command2), seq, false, table SY_Palette_MSTR, PROD_ID,
> > DYNAMICS;
> >
> > Please note that in v8.0, the toolbar and palettes have been completely
> > removed and replaced with a Command and Menu system.  Full details of how 
> > to
> > integrate with the v8.0 navigation model is included in the v8.0 
> > integration
> > guide manual.
> >
> > Hope this helps.
> >
> > David Musgrave
> > Senior Development Consultant
> > MBS Services - Asia Pacific
> >
> > Microsoft Business Solutions
> > http://www.microsoft.com/BusinessSolutions
> >
> > mailto:dmusgrav@nospam-microsoft.com
> >
> > Any views contained within are my personal views and
> > not necessarily Microsoft Business Solutions policy.
> > This posting is provided "AS IS" with no warranties,
> > and confers no rights.
> >
> >
> > "Matt" wrote:
> >
> >> David,
> >>
> >> Thank you so much for the advice, however I couldn't quite get everything 
> >> to
> >> work.  I switched my trigger to use Add_Successful_Login_Record.  It is
> >> firing, but the Add_Palette_Selection is still not adding the palette 
> >> items.
> >> I am trying to add two palette items to two different palettes
> >>
> >> local integer seq;
> >> call Add_Palette_Selection, 199, "Prompt1", "Command1", seq, true, table
> >> SY_Palette_MSTR, 681;
> >> call Add_Palette_Selection, 197, "Prompt2", "Command2", seq, true, table
> >> SY_Palette_MSTR, 681;
> >>
> >> I tried it with and without my dictionary id.  The seq number returned 
> >> after
> >> the first call is 1, after the second, it is 2.  No palette items show up 
> >> on
> >> the palettes (Routines > Payroll and Reports > Payroll respectivley) and
> >> their are no new entries in the SY00200 table.  Is there anything else I
> >> should be doing or checking.  No errors are thrown.
> >>
> >> Also, in your reply you talked about procedures for SY_Toolbar_MSTR, what
> >> are the names of procedures that delete and add toolbar items.  I would
> >> certinaly rather use your global procedures in place of my procs.
> >>
> >> Thanks,
> >> Matt
> >>
> >>
> >> "David Musgrave" <dmusgrav@nospam-microsoft.com> wrote in message
> >> news:0FB57840-F308-4EE0-BBFC-FE1808276C8C@microsoft.com...
> >> > Matt
> >> >
> >> > First point..... Please do not use a trigger on the OK button of the
> >> > Switch
> >> > Company form to run code after logging in.  The issue is that this code
> >> > will
> >> > attempt to run regardless of which the login attempt was successful and 
> >> > so
> >> > will attempt to access tables etc before a connection to SQL is made. 
> >> > This
> >> > results in Dexterity's login dialog showing and eventually a script
> >> > exception.
> >> >
> >> > Instead use a procedure trigger on the Add_Successful_Login_Record 
> >> > global
> >> > procedure.  If you want to run code when logging out, trigger on
> >> > Add_Successful_Logout_Record.
> >> >
> >> > To add Palette items you can simply call Add_Palette_Selection global
> >> > procedure from your trigger on login.  Even better, check that all your
> >> > tables have been created first and only add your toolbar or palette
> >> > entries
> >> > if the tables are ready.
> >> >
> >> > You can also just write your own code to update the SY_Toolbar_MSTR and
> >> > SY_Palette_MSTR tables directly.  I did this as my code checks to see 
> >> > if
> >> > the
> >> > entries are already there to prevent adding twice. They also have the
> >> > ability
> >> > to remove any entries I add (and cleanup the sequence numbers rather 
> >> > than
> >> > leave a hole). Another useful bit of feature of the code I wrote is 
> >> > that
> >> > they
> >> > will automatically update the dictionary IDs depending on whether I am 
> >> > in
> >> > Test mode or runtime mode.  Hence my menus always work while I am
> >> > developing.
> >> >
> >> > One last point.... as your trigger is currently running before the OK
> >> > button, it will be running before logging into the company.  You will 
> >> > be
> >> > able
> >> > to access the System database and so SY_Toolbar_MSTR, but not the 
> >> > company
> >> > database or SY_Palette_MSTR table.
> >> >
> >> > Hope this helps.
> >> >
> >> > David Musgrave
> >> > Senior Development Consultant
> >> > MBS Services - Asia Pacific
> >> >
> >> > Microsoft Business Solutions
> >> > http://www.microsoft.com/BusinessSolutions
> >> >
> >> > mailto:dmusgrav@nospam-microsoft.com
> >> >
> >> > Any views contained within are my personal views and
> >> > not necessarily Microsoft Business Solutions policy.
> >> > This posting is provided "AS IS" with no warranties,
> >> > and confers no rights.
> >> >
> >> >
> >> >
> >> > "Matt" wrote:
> >> >
> >> >> I have been having trouble in Dexterity adding palette items.  Our
> >> >> product
> >> >> used to only use toolbar items, but we were hoping to add a palette 
> >> >> item.
> >> >> When we struggled with this about a year ago, the support technition 
> >> >> had
> >> >> me
> >> >> run the add toolbar script off of a trigger on the OK button on the
> >> >> User/Company login screen.  That same script I am using to add to the
> >> >> tool
> >> >> bar(basically the script goes though the toolbar items in
> >> >> SY_Toolbar_MSTR,
> >> >> if it finds the item i am trying to add it does nothing, if it doesnt
> >> >> find
> >> >> it, it adds it on the end) i am not making a call to a global script
> >> >> called
> >> >> AddPaletteItem (effectively does the same thing as the add tool bar
> >> >> except
> >> >> it use the SY_Palette_MSTR).  While the AddToolbarItem works, the
> >> >> AddPaletteItem (on the save table command) has an err() of 0 but 
> >> >> doesnt
> >> >> update the database.  In debug mode, it crashes Dexterity saying that 
> >> >> it
> >> >> cant find the table .SY00200 (which is the SY_Palette_MSTR table, but 
> >> >> i
> >> >> am
> >> >> troubled by the "." before the table name) and when i turn it into a
> >> >> chunk
> >> >> file and popup warning messages around what i am doing, it succeeds 
> >> >> with
> >> >> the
> >> >> err() being 0 after the save table command.  I just have no clue what 
> >> >> is
> >> >> going on.  Is the problem where i am trying to access a company table?
> >> >> Is
> >> >> it because my focus trigger is TRIGGER_BEFORE_ORIGINAL on the OK 
> >> >> button?
> >> >> What else can I do to figure out my problem.
> >> >>
> >> >> On another note, I was unable to delete from the SY_Toolbar_MSTR table 
> >> >> at
> >> >> this same point in time.  I had to use pass through SQL and restrict 
> >> >> my
> >> >> product to SQL only users.  I would rather not do this, but it wont
> >> >> unlock
> >> >> the table.
> >> >>
> >> >>
> >> >>
> >> >>
> >> >
> >>
> >>
> >>
> >>
> > 
> 
> 
> 
> 
0
dmusgrav (157)
10/21/2004 12:05:03 AM
oops.... I forgot the change the seq parameter to l_seq_number.

Also note that the constant FORMTYPE and DT_FORM are interchangeable.

David Musgrave
Senior Development Consultant
MBS Services - Asia Pacific

Microsoft Business Solutions
http://www.microsoft.com/BusinessSolutions

mailto:dmusgrav@nospam-microsoft.com

Any views contained within are my personal views and 
not necessarily Microsoft Business Solutions policy.
This posting is provided "AS IS" with no warranties, 
and confers no rights.  


"David Musgrave" wrote:

> Matt
> 
> We need some more code..... as we have not limited the table buffer to the 
> range for our palette only.
> 
> 
> local integer l_seq_number, nPaletteID;
> local boolean l_empty;
> 
> nPaletteID = Resource_GetID(DYNAMICS,DT_FORM,technicalname(form 
> Transactions_Payroll_Palette));
> 
> range clear table SY_Palette_MSTR;
> clear table SY_Palette_MSTR;
> 'Language ID' of table SY_Palette_MSTR = 'Language ID' of globals;
> 'Palette Dictionary ID' of table SY_Palette_MSTR = DYNAMICS;
> 'PaletteID' of table SY_Palette_MSTR = nPaletteID;
> range start table SY_Palette_MSTR;
> fill table SY_Palette_MSTR;
> 'Language ID' of table SY_Palette_MSTR = 'Language ID' of globals;
> 'Palette Dictionary ID' of table SY_Palette_MSTR = DYNAMICS;
> 'PaletteID' of table SY_Palette_MSTR = nPaletteID;
> range end table SY_Palette_MSTR;
> 
> get last table SY_Palette_MSTR;
> if err() = EOF then
> 	l_empty = true;
> 	l_seq_number = 0;
> else
> 	l_empty = false;
> end if;
> 
> call Add_Palette_Selection, nPaletteID, getmsg(22001){Prompt1}, 
> technicalname(form Command1), seq, l_empty, table SY_Palette_MSTR, PROD_ID, 
> DYNAMICS;
> 
> Please repeat this entire section of code for palette entry on the other 
> palette.
> 
> David Musgrave
> Senior Development Consultant
> MBS Services - Asia Pacific
> 
> Microsoft Business Solutions
> http://www.microsoft.com/BusinessSolutions
> 
> mailto:dmusgrav@nospam-microsoft.com
> 
> Any views contained within are my personal views and 
> not necessarily Microsoft Business Solutions policy.
> This posting is provided "AS IS" with no warranties, 
> and confers no rights.  
> 
> 
> "Matt" wrote:
> 
> > David,
> > 
> > It still didn't work. I used your code and still no palettes appeared, and 
> > the database had no new records.  It returned a sequence number of 2 for 
> > both calls which I thought was odd since both palettes have more than 1 item 
> > in them.  Is there some code that i could add that would give me a better 
> > idea of what is failing when it is trying to save?  I looked in the table 
> > buffer after the call, and the sequence number is 2 and the command prompt 
> > is what it should be.  Any other suggestions.
> > 
> > Matt
> > 
> > 
> > "David Musgrave" <dmusgrav@nospam-microsoft.com> wrote in message 
> > news:C98038E1-2609-49F4-A3CF-167DBBEE9763@microsoft.com...
> > > Matt
> > >
> > > I'm sorry, there aren't any built in scripts for manipulating the Toolbar.
> > > You will need to write into SY_Toolbar_MSTR table yourself. Why don't you
> > > create a function or procedure that you can call to add your toolbar 
> > > entries.
> > >
> > > For Palettes and the SY_Palette_MSTR table there are two scripts;
> > > Add_Palette_Selection and Delete_Palette_Selection which you can use.
> > >
> > > I have altered your code to not use any hardcoded values or strings. You
> > > will need to create a constant PROD_ID = 681 and messages 22001 and 22002 
> > > for
> > > your prompts.  I have also added the optional last parameter being the
> > > dictionary ID for the palette form, in this case DYNAMICS.
> > >
> > > I believe the code was failing as you have the boolean value for IN_empty 
> > > as
> > > true.  This means that the adding code will believe that the palette is 
> > > empty
> > > and will try to start adding at position 1.  This is actually causing a
> > > duplicate key error, but as there is no check error or other err() checks
> > > after the save table command, you will not see the error.  Using a value 
> > > as
> > > false will add the palette entry to the end, unless it already exists in
> > > which case it will not be added again.
> > >
> > > local integer seq;
> > >
> > > call Add_Palette_Selection, Resource_GetID(DYNAMICS, FORMTYPE,
> > > technicalname(form Transactions_Payroll_Palette)), getmsg(22001){Prompt1},
> > > technicalname(form Command1), seq, false, table SY_Palette_MSTR, PROD_ID,
> > > DYNAMICS;
> > >
> > > call Add_Palette_Selection, Resource_GetID(DYNAMICS, FORMTYPE,
> > > technicalname(form Report_Payroll_Palette)), getmsg(22002){Prompt2},
> > > technicalname(form Command2), seq, false, table SY_Palette_MSTR, PROD_ID,
> > > DYNAMICS;
> > >
> > > Please note that in v8.0, the toolbar and palettes have been completely
> > > removed and replaced with a Command and Menu system.  Full details of how 
> > > to
> > > integrate with the v8.0 navigation model is included in the v8.0 
> > > integration
> > > guide manual.
> > >
> > > Hope this helps.
> > >
> > > David Musgrave
> > > Senior Development Consultant
> > > MBS Services - Asia Pacific
> > >
> > > Microsoft Business Solutions
> > > http://www.microsoft.com/BusinessSolutions
> > >
> > > mailto:dmusgrav@nospam-microsoft.com
> > >
> > > Any views contained within are my personal views and
> > > not necessarily Microsoft Business Solutions policy.
> > > This posting is provided "AS IS" with no warranties,
> > > and confers no rights.
> > >
> > >
> > > "Matt" wrote:
> > >
> > >> David,
> > >>
> > >> Thank you so much for the advice, however I couldn't quite get everything 
> > >> to
> > >> work.  I switched my trigger to use Add_Successful_Login_Record.  It is
> > >> firing, but the Add_Palette_Selection is still not adding the palette 
> > >> items.
> > >> I am trying to add two palette items to two different palettes
> > >>
> > >> local integer seq;
> > >> call Add_Palette_Selection, 199, "Prompt1", "Command1", seq, true, table
> > >> SY_Palette_MSTR, 681;
> > >> call Add_Palette_Selection, 197, "Prompt2", "Command2", seq, true, table
> > >> SY_Palette_MSTR, 681;
> > >>
> > >> I tried it with and without my dictionary id.  The seq number returned 
> > >> after
> > >> the first call is 1, after the second, it is 2.  No palette items show up 
> > >> on
> > >> the palettes (Routines > Payroll and Reports > Payroll respectivley) and
> > >> their are no new entries in the SY00200 table.  Is there anything else I
> > >> should be doing or checking.  No errors are thrown.
> > >>
> > >> Also, in your reply you talked about procedures for SY_Toolbar_MSTR, what
> > >> are the names of procedures that delete and add toolbar items.  I would
> > >> certinaly rather use your global procedures in place of my procs.
> > >>
> > >> Thanks,
> > >> Matt
> > >>
> > >>
> > >> "David Musgrave" <dmusgrav@nospam-microsoft.com> wrote in message
> > >> news:0FB57840-F308-4EE0-BBFC-FE1808276C8C@microsoft.com...
> > >> > Matt
> > >> >
> > >> > First point..... Please do not use a trigger on the OK button of the
> > >> > Switch
> > >> > Company form to run code after logging in.  The issue is that this code
> > >> > will
> > >> > attempt to run regardless of which the login attempt was successful and 
> > >> > so
> > >> > will attempt to access tables etc before a connection to SQL is made. 
> > >> > This
> > >> > results in Dexterity's login dialog showing and eventually a script
> > >> > exception.
> > >> >
> > >> > Instead use a procedure trigger on the Add_Successful_Login_Record 
> > >> > global
> > >> > procedure.  If you want to run code when logging out, trigger on
> > >> > Add_Successful_Logout_Record.
> > >> >
> > >> > To add Palette items you can simply call Add_Palette_Selection global
> > >> > procedure from your trigger on login.  Even better, check that all your
> > >> > tables have been created first and only add your toolbar or palette
> > >> > entries
> > >> > if the tables are ready.
> > >> >
> > >> > You can also just write your own code to update the SY_Toolbar_MSTR and
> > >> > SY_Palette_MSTR tables directly.  I did this as my code checks to see 
> > >> > if
> > >> > the
> > >> > entries are already there to prevent adding twice. They also have the
> > >> > ability
> > >> > to remove any entries I add (and cleanup the sequence numbers rather 
> > >> > than
> > >> > leave a hole). Another useful bit of feature of the code I wrote is 
> > >> > that
> > >> > they
> > >> > will automatically update the dictionary IDs depending on whether I am 
> > >> > in
> > >> > Test mode or runtime mode.  Hence my menus always work while I am
> > >> > developing.
> > >> >
> > >> > One last point.... as your trigger is currently running before the OK
> > >> > button, it will be running before logging into the company.  You will 
> > >> > be
> > >> > able
> > >> > to access the System database and so SY_Toolbar_MSTR, but not the 
> > >> > company
> > >> > database or SY_Palette_MSTR table.
> > >> >
> > >> > Hope this helps.
> > >> >
> > >> > David Musgrave
> > >> > Senior Development Consultant
> > >> > MBS Services - Asia Pacific
> > >> >
> > >> > Microsoft Business Solutions
> > >> > http://www.microsoft.com/BusinessSolutions
> > >> >
> > >> > mailto:dmusgrav@nospam-microsoft.com
> > >> >
> > >> > Any views contained within are my personal views and
> > >> > not necessarily Microsoft Business Solutions policy.
> > >> > This posting is provided "AS IS" with no warranties,
> > >> > and confers no rights.
> > >> >
> > >> >
> > >> >
> > >> > "Matt" wrote:
> > >> >
> > >> >> I have been having trouble in Dexterity adding palette items.  Our
> > >> >> product
> > >> >> used to only use toolbar items, but we were hoping to add a palette 
> > >> >> item.
> > >> >> When we struggled with this about a year ago, the support technition 
> > >> >> had
> > >> >> me
> > >> >> run the add toolbar script off of a trigger on the OK button on the
> > >> >> User/Company login screen.  That same script I am using to add to the
> > >> >> tool
> > >> >> bar(basically the script goes though the toolbar items in
> > >> >> SY_Toolbar_MSTR,
> > >> >> if it finds the item i am trying to add it does nothing, if it doesnt
> > >> >> find
> > >> >> it, it adds it on the end) i am not making a call to a global script
> > >> >> called
> > >> >> AddPaletteItem (effectively does the same thing as the add tool bar
> > >> >> except
> > >> >> it use the SY_Palette_MSTR).  While the AddToolbarItem works, the
> > >> >> AddPaletteItem (on the save table command) has an err() of 0 but 
> > >> >> doesnt
> > >> >> update the database.  In debug mode, it crashes Dexterity saying that 
> > >> >> it
> > >> >> cant find the table .SY00200 (which is the SY_Palette_MSTR table, but 
> > >> >> i
> > >> >> am
> > >> >> troubled by the "." before the table name) and when i turn it into a
> > >> >> chunk
> > >> >> file and popup warning messages around what i am doing, it succeeds 
> > >> >> with
> > >> >> the
> > >> >> err() being 0 after the save table command.  I just have no clue what 
> > >> >> is
> > >> >> going on.  Is the problem where i am trying to access a company table?
> > >> >> Is
> > >> >> it because my focus trigger is TRIGGER_BEFORE_ORIGINAL on the OK 
> > >> >> button?
> > >> >> What else can I do to figure out my problem.
> > >> >>
> > >> >> On another note, I was unable to delete from the SY_Toolbar_MSTR table 
> > >> >> at
> > >> >> this same point in time.  I had to use pass through SQL and restrict 
> > >> >> my
> > >> >> product to SQL only users.  I would rather not do this, but it wont
> > >> >> unlock
> > >> >> the table.
> > >> >>
> > >> >>
> > >> >>
> > >> >>
> > >> >
> > >>
> > >>
> > >>
> > >>
> > > 
> > 
> > 
> > 
> > 
0
dmusgrav (157)
10/21/2004 12:11:02 AM
Also note that the develop.cnk is the dexterity sample integrating
application installed with Dexterity and shows exactly how to do this with
full source code.

patrick
mbs tools support


"David Musgrave" <dmusgrav@nospam-microsoft.com> wrote in message
news:0611AFA3-A49B-4F69-9DEF-5076610CD376@microsoft.com...
> oops.... I forgot the change the seq parameter to l_seq_number.
>
> Also note that the constant FORMTYPE and DT_FORM are interchangeable.
>
> David Musgrave
> Senior Development Consultant
> MBS Services - Asia Pacific
>
> Microsoft Business Solutions
> http://www.microsoft.com/BusinessSolutions
>
> mailto:dmusgrav@nospam-microsoft.com
>
> Any views contained within are my personal views and
> not necessarily Microsoft Business Solutions policy.
> This posting is provided "AS IS" with no warranties,
> and confers no rights.
>
>
> "David Musgrave" wrote:
>
> > Matt
> >
> > We need some more code..... as we have not limited the table buffer to
the
> > range for our palette only.
> >
> >
> > local integer l_seq_number, nPaletteID;
> > local boolean l_empty;
> >
> > nPaletteID = Resource_GetID(DYNAMICS,DT_FORM,technicalname(form
> > Transactions_Payroll_Palette));
> >
> > range clear table SY_Palette_MSTR;
> > clear table SY_Palette_MSTR;
> > 'Language ID' of table SY_Palette_MSTR = 'Language ID' of globals;
> > 'Palette Dictionary ID' of table SY_Palette_MSTR = DYNAMICS;
> > 'PaletteID' of table SY_Palette_MSTR = nPaletteID;
> > range start table SY_Palette_MSTR;
> > fill table SY_Palette_MSTR;
> > 'Language ID' of table SY_Palette_MSTR = 'Language ID' of globals;
> > 'Palette Dictionary ID' of table SY_Palette_MSTR = DYNAMICS;
> > 'PaletteID' of table SY_Palette_MSTR = nPaletteID;
> > range end table SY_Palette_MSTR;
> >
> > get last table SY_Palette_MSTR;
> > if err() = EOF then
> > l_empty = true;
> > l_seq_number = 0;
> > else
> > l_empty = false;
> > end if;
> >
> > call Add_Palette_Selection, nPaletteID, getmsg(22001){Prompt1},
> > technicalname(form Command1), seq, l_empty, table SY_Palette_MSTR,
PROD_ID,
> > DYNAMICS;
> >
> > Please repeat this entire section of code for palette entry on the other
> > palette.
> >
> > David Musgrave
> > Senior Development Consultant
> > MBS Services - Asia Pacific
> >
> > Microsoft Business Solutions
> > http://www.microsoft.com/BusinessSolutions
> >
> > mailto:dmusgrav@nospam-microsoft.com
> >
> > Any views contained within are my personal views and
> > not necessarily Microsoft Business Solutions policy.
> > This posting is provided "AS IS" with no warranties,
> > and confers no rights.
> >
> >
> > "Matt" wrote:
> >
> > > David,
> > >
> > > It still didn't work. I used your code and still no palettes appeared,
and
> > > the database had no new records.  It returned a sequence number of 2
for
> > > both calls which I thought was odd since both palettes have more than
1 item
> > > in them.  Is there some code that i could add that would give me a
better
> > > idea of what is failing when it is trying to save?  I looked in the
table
> > > buffer after the call, and the sequence number is 2 and the command
prompt
> > > is what it should be.  Any other suggestions.
> > >
> > > Matt
> > >
> > >
> > > "David Musgrave" <dmusgrav@nospam-microsoft.com> wrote in message
> > > news:C98038E1-2609-49F4-A3CF-167DBBEE9763@microsoft.com...
> > > > Matt
> > > >
> > > > I'm sorry, there aren't any built in scripts for manipulating the
Toolbar.
> > > > You will need to write into SY_Toolbar_MSTR table yourself. Why
don't you
> > > > create a function or procedure that you can call to add your toolbar
> > > > entries.
> > > >
> > > > For Palettes and the SY_Palette_MSTR table there are two scripts;
> > > > Add_Palette_Selection and Delete_Palette_Selection which you can
use.
> > > >
> > > > I have altered your code to not use any hardcoded values or strings.
You
> > > > will need to create a constant PROD_ID = 681 and messages 22001 and
22002
> > > > for
> > > > your prompts.  I have also added the optional last parameter being
the
> > > > dictionary ID for the palette form, in this case DYNAMICS.
> > > >
> > > > I believe the code was failing as you have the boolean value for
IN_empty
> > > > as
> > > > true.  This means that the adding code will believe that the palette
is
> > > > empty
> > > > and will try to start adding at position 1.  This is actually
causing a
> > > > duplicate key error, but as there is no check error or other err()
checks
> > > > after the save table command, you will not see the error.  Using a
value
> > > > as
> > > > false will add the palette entry to the end, unless it already
exists in
> > > > which case it will not be added again.
> > > >
> > > > local integer seq;
> > > >
> > > > call Add_Palette_Selection, Resource_GetID(DYNAMICS, FORMTYPE,
> > > > technicalname(form Transactions_Payroll_Palette)),
getmsg(22001){Prompt1},
> > > > technicalname(form Command1), seq, false, table SY_Palette_MSTR,
PROD_ID,
> > > > DYNAMICS;
> > > >
> > > > call Add_Palette_Selection, Resource_GetID(DYNAMICS, FORMTYPE,
> > > > technicalname(form Report_Payroll_Palette)), getmsg(22002){Prompt2},
> > > > technicalname(form Command2), seq, false, table SY_Palette_MSTR,
PROD_ID,
> > > > DYNAMICS;
> > > >
> > > > Please note that in v8.0, the toolbar and palettes have been
completely
> > > > removed and replaced with a Command and Menu system.  Full details
of how
> > > > to
> > > > integrate with the v8.0 navigation model is included in the v8.0
> > > > integration
> > > > guide manual.
> > > >
> > > > Hope this helps.
> > > >
> > > > David Musgrave
> > > > Senior Development Consultant
> > > > MBS Services - Asia Pacific
> > > >
> > > > Microsoft Business Solutions
> > > > http://www.microsoft.com/BusinessSolutions
> > > >
> > > > mailto:dmusgrav@nospam-microsoft.com
> > > >
> > > > Any views contained within are my personal views and
> > > > not necessarily Microsoft Business Solutions policy.
> > > > This posting is provided "AS IS" with no warranties,
> > > > and confers no rights.
> > > >
> > > >
> > > > "Matt" wrote:
> > > >
> > > >> David,
> > > >>
> > > >> Thank you so much for the advice, however I couldn't quite get
everything
> > > >> to
> > > >> work.  I switched my trigger to use Add_Successful_Login_Record.
It is
> > > >> firing, but the Add_Palette_Selection is still not adding the
palette
> > > >> items.
> > > >> I am trying to add two palette items to two different palettes
> > > >>
> > > >> local integer seq;
> > > >> call Add_Palette_Selection, 199, "Prompt1", "Command1", seq, true,
table
> > > >> SY_Palette_MSTR, 681;
> > > >> call Add_Palette_Selection, 197, "Prompt2", "Command2", seq, true,
table
> > > >> SY_Palette_MSTR, 681;
> > > >>
> > > >> I tried it with and without my dictionary id.  The seq number
returned
> > > >> after
> > > >> the first call is 1, after the second, it is 2.  No palette items
show up
> > > >> on
> > > >> the palettes (Routines > Payroll and Reports > Payroll
respectivley) and
> > > >> their are no new entries in the SY00200 table.  Is there anything
else I
> > > >> should be doing or checking.  No errors are thrown.
> > > >>
> > > >> Also, in your reply you talked about procedures for
SY_Toolbar_MSTR, what
> > > >> are the names of procedures that delete and add toolbar items.  I
would
> > > >> certinaly rather use your global procedures in place of my procs.
> > > >>
> > > >> Thanks,
> > > >> Matt
> > > >>
> > > >>
> > > >> "David Musgrave" <dmusgrav@nospam-microsoft.com> wrote in message
> > > >> news:0FB57840-F308-4EE0-BBFC-FE1808276C8C@microsoft.com...
> > > >> > Matt
> > > >> >
> > > >> > First point..... Please do not use a trigger on the OK button of
the
> > > >> > Switch
> > > >> > Company form to run code after logging in.  The issue is that
this code
> > > >> > will
> > > >> > attempt to run regardless of which the login attempt was
successful and
> > > >> > so
> > > >> > will attempt to access tables etc before a connection to SQL is
made.
> > > >> > This
> > > >> > results in Dexterity's login dialog showing and eventually a
script
> > > >> > exception.
> > > >> >
> > > >> > Instead use a procedure trigger on the
Add_Successful_Login_Record
> > > >> > global
> > > >> > procedure.  If you want to run code when logging out, trigger on
> > > >> > Add_Successful_Logout_Record.
> > > >> >
> > > >> > To add Palette items you can simply call Add_Palette_Selection
global
> > > >> > procedure from your trigger on login.  Even better, check that
all your
> > > >> > tables have been created first and only add your toolbar or
palette
> > > >> > entries
> > > >> > if the tables are ready.
> > > >> >
> > > >> > You can also just write your own code to update the
SY_Toolbar_MSTR and
> > > >> > SY_Palette_MSTR tables directly.  I did this as my code checks to
see
> > > >> > if
> > > >> > the
> > > >> > entries are already there to prevent adding twice. They also have
the
> > > >> > ability
> > > >> > to remove any entries I add (and cleanup the sequence numbers
rather
> > > >> > than
> > > >> > leave a hole). Another useful bit of feature of the code I wrote
is
> > > >> > that
> > > >> > they
> > > >> > will automatically update the dictionary IDs depending on whether
I am
> > > >> > in
> > > >> > Test mode or runtime mode.  Hence my menus always work while I am
> > > >> > developing.
> > > >> >
> > > >> > One last point.... as your trigger is currently running before
the OK
> > > >> > button, it will be running before logging into the company.  You
will
> > > >> > be
> > > >> > able
> > > >> > to access the System database and so SY_Toolbar_MSTR, but not the
> > > >> > company
> > > >> > database or SY_Palette_MSTR table.
> > > >> >
> > > >> > Hope this helps.
> > > >> >
> > > >> > David Musgrave
> > > >> > Senior Development Consultant
> > > >> > MBS Services - Asia Pacific
> > > >> >
> > > >> > Microsoft Business Solutions
> > > >> > http://www.microsoft.com/BusinessSolutions
> > > >> >
> > > >> > mailto:dmusgrav@nospam-microsoft.com
> > > >> >
> > > >> > Any views contained within are my personal views and
> > > >> > not necessarily Microsoft Business Solutions policy.
> > > >> > This posting is provided "AS IS" with no warranties,
> > > >> > and confers no rights.
> > > >> >
> > > >> >
> > > >> >
> > > >> > "Matt" wrote:
> > > >> >
> > > >> >> I have been having trouble in Dexterity adding palette items.
Our
> > > >> >> product
> > > >> >> used to only use toolbar items, but we were hoping to add a
palette
> > > >> >> item.
> > > >> >> When we struggled with this about a year ago, the support
technition
> > > >> >> had
> > > >> >> me
> > > >> >> run the add toolbar script off of a trigger on the OK button on
the
> > > >> >> User/Company login screen.  That same script I am using to add
to the
> > > >> >> tool
> > > >> >> bar(basically the script goes though the toolbar items in
> > > >> >> SY_Toolbar_MSTR,
> > > >> >> if it finds the item i am trying to add it does nothing, if it
doesnt
> > > >> >> find
> > > >> >> it, it adds it on the end) i am not making a call to a global
script
> > > >> >> called
> > > >> >> AddPaletteItem (effectively does the same thing as the add tool
bar
> > > >> >> except
> > > >> >> it use the SY_Palette_MSTR).  While the AddToolbarItem works,
the
> > > >> >> AddPaletteItem (on the save table command) has an err() of 0 but
> > > >> >> doesnt
> > > >> >> update the database.  In debug mode, it crashes Dexterity saying
that
> > > >> >> it
> > > >> >> cant find the table .SY00200 (which is the SY_Palette_MSTR
table, but
> > > >> >> i
> > > >> >> am
> > > >> >> troubled by the "." before the table name) and when i turn it
into a
> > > >> >> chunk
> > > >> >> file and popup warning messages around what i am doing, it
succeeds
> > > >> >> with
> > > >> >> the
> > > >> >> err() being 0 after the save table command.  I just have no clue
what
> > > >> >> is
> > > >> >> going on.  Is the problem where i am trying to access a company
table?
> > > >> >> Is
> > > >> >> it because my focus trigger is TRIGGER_BEFORE_ORIGINAL on the OK
> > > >> >> button?
> > > >> >> What else can I do to figure out my problem.
> > > >> >>
> > > >> >> On another note, I was unable to delete from the SY_Toolbar_MSTR
table
> > > >> >> at
> > > >> >> this same point in time.  I had to use pass through SQL and
restrict
> > > >> >> my
> > > >> >> product to SQL only users.  I would rather not do this, but it
wont
> > > >> >> unlock
> > > >> >> the table.
> > > >> >>
> > > >> >>
> > > >> >>
> > > >> >>
> > > >> >
> > > >>
> > > >>
> > > >>
> > > >>
> > > >
> > >
> > >
> > >
> > >


0
10/21/2004 2:31:49 AM
David,

Thank you so much.  I am not quite sure why that made the difference, but it 
did.  It worked with no problem the first time after I added that code.

Matt

"David Musgrave" <dmusgrav@nospam-microsoft.com> wrote in message 
news:0611AFA3-A49B-4F69-9DEF-5076610CD376@microsoft.com...
> oops.... I forgot the change the seq parameter to l_seq_number.
>
> Also note that the constant FORMTYPE and DT_FORM are interchangeable.
>
> David Musgrave
> Senior Development Consultant
> MBS Services - Asia Pacific
>
> Microsoft Business Solutions
> http://www.microsoft.com/BusinessSolutions
>
> mailto:dmusgrav@nospam-microsoft.com
>
> Any views contained within are my personal views and
> not necessarily Microsoft Business Solutions policy.
> This posting is provided "AS IS" with no warranties,
> and confers no rights.
>
>
> "David Musgrave" wrote:
>
>> Matt
>>
>> We need some more code..... as we have not limited the table buffer to 
>> the
>> range for our palette only.
>>
>>
>> local integer l_seq_number, nPaletteID;
>> local boolean l_empty;
>>
>> nPaletteID = Resource_GetID(DYNAMICS,DT_FORM,technicalname(form
>> Transactions_Payroll_Palette));
>>
>> range clear table SY_Palette_MSTR;
>> clear table SY_Palette_MSTR;
>> 'Language ID' of table SY_Palette_MSTR = 'Language ID' of globals;
>> 'Palette Dictionary ID' of table SY_Palette_MSTR = DYNAMICS;
>> 'PaletteID' of table SY_Palette_MSTR = nPaletteID;
>> range start table SY_Palette_MSTR;
>> fill table SY_Palette_MSTR;
>> 'Language ID' of table SY_Palette_MSTR = 'Language ID' of globals;
>> 'Palette Dictionary ID' of table SY_Palette_MSTR = DYNAMICS;
>> 'PaletteID' of table SY_Palette_MSTR = nPaletteID;
>> range end table SY_Palette_MSTR;
>>
>> get last table SY_Palette_MSTR;
>> if err() = EOF then
>> l_empty = true;
>> l_seq_number = 0;
>> else
>> l_empty = false;
>> end if;
>>
>> call Add_Palette_Selection, nPaletteID, getmsg(22001){Prompt1},
>> technicalname(form Command1), seq, l_empty, table SY_Palette_MSTR, 
>> PROD_ID,
>> DYNAMICS;
>>
>> Please repeat this entire section of code for palette entry on the other
>> palette.
>>
>> David Musgrave
>> Senior Development Consultant
>> MBS Services - Asia Pacific
>>
>> Microsoft Business Solutions
>> http://www.microsoft.com/BusinessSolutions
>>
>> mailto:dmusgrav@nospam-microsoft.com
>>
>> Any views contained within are my personal views and
>> not necessarily Microsoft Business Solutions policy.
>> This posting is provided "AS IS" with no warranties,
>> and confers no rights.
>>
>>
>> "Matt" wrote:
>>
>> > David,
>> >
>> > It still didn't work. I used your code and still no palettes appeared, 
>> > and
>> > the database had no new records.  It returned a sequence number of 2 
>> > for
>> > both calls which I thought was odd since both palettes have more than 1 
>> > item
>> > in them.  Is there some code that i could add that would give me a 
>> > better
>> > idea of what is failing when it is trying to save?  I looked in the 
>> > table
>> > buffer after the call, and the sequence number is 2 and the command 
>> > prompt
>> > is what it should be.  Any other suggestions.
>> >
>> > Matt
>> >
>> >
>> > "David Musgrave" <dmusgrav@nospam-microsoft.com> wrote in message
>> > news:C98038E1-2609-49F4-A3CF-167DBBEE9763@microsoft.com...
>> > > Matt
>> > >
>> > > I'm sorry, there aren't any built in scripts for manipulating the 
>> > > Toolbar.
>> > > You will need to write into SY_Toolbar_MSTR table yourself. Why don't 
>> > > you
>> > > create a function or procedure that you can call to add your toolbar
>> > > entries.
>> > >
>> > > For Palettes and the SY_Palette_MSTR table there are two scripts;
>> > > Add_Palette_Selection and Delete_Palette_Selection which you can use.
>> > >
>> > > I have altered your code to not use any hardcoded values or strings. 
>> > > You
>> > > will need to create a constant PROD_ID = 681 and messages 22001 and 
>> > > 22002
>> > > for
>> > > your prompts.  I have also added the optional last parameter being 
>> > > the
>> > > dictionary ID for the palette form, in this case DYNAMICS.
>> > >
>> > > I believe the code was failing as you have the boolean value for 
>> > > IN_empty
>> > > as
>> > > true.  This means that the adding code will believe that the palette 
>> > > is
>> > > empty
>> > > and will try to start adding at position 1.  This is actually causing 
>> > > a
>> > > duplicate key error, but as there is no check error or other err() 
>> > > checks
>> > > after the save table command, you will not see the error.  Using a 
>> > > value
>> > > as
>> > > false will add the palette entry to the end, unless it already exists 
>> > > in
>> > > which case it will not be added again.
>> > >
>> > > local integer seq;
>> > >
>> > > call Add_Palette_Selection, Resource_GetID(DYNAMICS, FORMTYPE,
>> > > technicalname(form Transactions_Payroll_Palette)), 
>> > > getmsg(22001){Prompt1},
>> > > technicalname(form Command1), seq, false, table SY_Palette_MSTR, 
>> > > PROD_ID,
>> > > DYNAMICS;
>> > >
>> > > call Add_Palette_Selection, Resource_GetID(DYNAMICS, FORMTYPE,
>> > > technicalname(form Report_Payroll_Palette)), getmsg(22002){Prompt2},
>> > > technicalname(form Command2), seq, false, table SY_Palette_MSTR, 
>> > > PROD_ID,
>> > > DYNAMICS;
>> > >
>> > > Please note that in v8.0, the toolbar and palettes have been 
>> > > completely
>> > > removed and replaced with a Command and Menu system.  Full details of 
>> > > how
>> > > to
>> > > integrate with the v8.0 navigation model is included in the v8.0
>> > > integration
>> > > guide manual.
>> > >
>> > > Hope this helps.
>> > >
>> > > David Musgrave
>> > > Senior Development Consultant
>> > > MBS Services - Asia Pacific
>> > >
>> > > Microsoft Business Solutions
>> > > http://www.microsoft.com/BusinessSolutions
>> > >
>> > > mailto:dmusgrav@nospam-microsoft.com
>> > >
>> > > Any views contained within are my personal views and
>> > > not necessarily Microsoft Business Solutions policy.
>> > > This posting is provided "AS IS" with no warranties,
>> > > and confers no rights.
>> > >
>> > >
>> > > "Matt" wrote:
>> > >
>> > >> David,
>> > >>
>> > >> Thank you so much for the advice, however I couldn't quite get 
>> > >> everything
>> > >> to
>> > >> work.  I switched my trigger to use Add_Successful_Login_Record.  It 
>> > >> is
>> > >> firing, but the Add_Palette_Selection is still not adding the 
>> > >> palette
>> > >> items.
>> > >> I am trying to add two palette items to two different palettes
>> > >>
>> > >> local integer seq;
>> > >> call Add_Palette_Selection, 199, "Prompt1", "Command1", seq, true, 
>> > >> table
>> > >> SY_Palette_MSTR, 681;
>> > >> call Add_Palette_Selection, 197, "Prompt2", "Command2", seq, true, 
>> > >> table
>> > >> SY_Palette_MSTR, 681;
>> > >>
>> > >> I tried it with and without my dictionary id.  The seq number 
>> > >> returned
>> > >> after
>> > >> the first call is 1, after the second, it is 2.  No palette items 
>> > >> show up
>> > >> on
>> > >> the palettes (Routines > Payroll and Reports > Payroll respectivley) 
>> > >> and
>> > >> their are no new entries in the SY00200 table.  Is there anything 
>> > >> else I
>> > >> should be doing or checking.  No errors are thrown.
>> > >>
>> > >> Also, in your reply you talked about procedures for SY_Toolbar_MSTR, 
>> > >> what
>> > >> are the names of procedures that delete and add toolbar items.  I 
>> > >> would
>> > >> certinaly rather use your global procedures in place of my procs.
>> > >>
>> > >> Thanks,
>> > >> Matt
>> > >>
>> > >>
>> > >> "David Musgrave" <dmusgrav@nospam-microsoft.com> wrote in message
>> > >> news:0FB57840-F308-4EE0-BBFC-FE1808276C8C@microsoft.com...
>> > >> > Matt
>> > >> >
>> > >> > First point..... Please do not use a trigger on the OK button of 
>> > >> > the
>> > >> > Switch
>> > >> > Company form to run code after logging in.  The issue is that this 
>> > >> > code
>> > >> > will
>> > >> > attempt to run regardless of which the login attempt was 
>> > >> > successful and
>> > >> > so
>> > >> > will attempt to access tables etc before a connection to SQL is 
>> > >> > made.
>> > >> > This
>> > >> > results in Dexterity's login dialog showing and eventually a 
>> > >> > script
>> > >> > exception.
>> > >> >
>> > >> > Instead use a procedure trigger on the Add_Successful_Login_Record
>> > >> > global
>> > >> > procedure.  If you want to run code when logging out, trigger on
>> > >> > Add_Successful_Logout_Record.
>> > >> >
>> > >> > To add Palette items you can simply call Add_Palette_Selection 
>> > >> > global
>> > >> > procedure from your trigger on login.  Even better, check that all 
>> > >> > your
>> > >> > tables have been created first and only add your toolbar or 
>> > >> > palette
>> > >> > entries
>> > >> > if the tables are ready.
>> > >> >
>> > >> > You can also just write your own code to update the 
>> > >> > SY_Toolbar_MSTR and
>> > >> > SY_Palette_MSTR tables directly.  I did this as my code checks to 
>> > >> > see
>> > >> > if
>> > >> > the
>> > >> > entries are already there to prevent adding twice. They also have 
>> > >> > the
>> > >> > ability
>> > >> > to remove any entries I add (and cleanup the sequence numbers 
>> > >> > rather
>> > >> > than
>> > >> > leave a hole). Another useful bit of feature of the code I wrote 
>> > >> > is
>> > >> > that
>> > >> > they
>> > >> > will automatically update the dictionary IDs depending on whether 
>> > >> > I am
>> > >> > in
>> > >> > Test mode or runtime mode.  Hence my menus always work while I am
>> > >> > developing.
>> > >> >
>> > >> > One last point.... as your trigger is currently running before the 
>> > >> > OK
>> > >> > button, it will be running before logging into the company.  You 
>> > >> > will
>> > >> > be
>> > >> > able
>> > >> > to access the System database and so SY_Toolbar_MSTR, but not the
>> > >> > company
>> > >> > database or SY_Palette_MSTR table.
>> > >> >
>> > >> > Hope this helps.
>> > >> >
>> > >> > David Musgrave
>> > >> > Senior Development Consultant
>> > >> > MBS Services - Asia Pacific
>> > >> >
>> > >> > Microsoft Business Solutions
>> > >> > http://www.microsoft.com/BusinessSolutions
>> > >> >
>> > >> > mailto:dmusgrav@nospam-microsoft.com
>> > >> >
>> > >> > Any views contained within are my personal views and
>> > >> > not necessarily Microsoft Business Solutions policy.
>> > >> > This posting is provided "AS IS" with no warranties,
>> > >> > and confers no rights.
>> > >> >
>> > >> >
>> > >> >
>> > >> > "Matt" wrote:
>> > >> >
>> > >> >> I have been having trouble in Dexterity adding palette items. 
>> > >> >> Our
>> > >> >> product
>> > >> >> used to only use toolbar items, but we were hoping to add a 
>> > >> >> palette
>> > >> >> item.
>> > >> >> When we struggled with this about a year ago, the support 
>> > >> >> technition
>> > >> >> had
>> > >> >> me
>> > >> >> run the add toolbar script off of a trigger on the OK button on 
>> > >> >> the
>> > >> >> User/Company login screen.  That same script I am using to add to 
>> > >> >> the
>> > >> >> tool
>> > >> >> bar(basically the script goes though the toolbar items in
>> > >> >> SY_Toolbar_MSTR,
>> > >> >> if it finds the item i am trying to add it does nothing, if it 
>> > >> >> doesnt
>> > >> >> find
>> > >> >> it, it adds it on the end) i am not making a call to a global 
>> > >> >> script
>> > >> >> called
>> > >> >> AddPaletteItem (effectively does the same thing as the add tool 
>> > >> >> bar
>> > >> >> except
>> > >> >> it use the SY_Palette_MSTR).  While the AddToolbarItem works, the
>> > >> >> AddPaletteItem (on the save table command) has an err() of 0 but
>> > >> >> doesnt
>> > >> >> update the database.  In debug mode, it crashes Dexterity saying 
>> > >> >> that
>> > >> >> it
>> > >> >> cant find the table .SY00200 (which is the SY_Palette_MSTR table, 
>> > >> >> but
>> > >> >> i
>> > >> >> am
>> > >> >> troubled by the "." before the table name) and when i turn it 
>> > >> >> into a
>> > >> >> chunk
>> > >> >> file and popup warning messages around what i am doing, it 
>> > >> >> succeeds
>> > >> >> with
>> > >> >> the
>> > >> >> err() being 0 after the save table command.  I just have no clue 
>> > >> >> what
>> > >> >> is
>> > >> >> going on.  Is the problem where i am trying to access a company 
>> > >> >> table?
>> > >> >> Is
>> > >> >> it because my focus trigger is TRIGGER_BEFORE_ORIGINAL on the OK
>> > >> >> button?
>> > >> >> What else can I do to figure out my problem.
>> > >> >>
>> > >> >> On another note, I was unable to delete from the SY_Toolbar_MSTR 
>> > >> >> table
>> > >> >> at
>> > >> >> this same point in time.  I had to use pass through SQL and 
>> > >> >> restrict
>> > >> >> my
>> > >> >> product to SQL only users.  I would rather not do this, but it 
>> > >> >> wont
>> > >> >> unlock
>> > >> >> the table.
>> > >> >>
>> > >> >>
>> > >> >>
>> > >> >>
>> > >> >
>> > >>
>> > >>
>> > >>
>> > >>
>> > >
>> >
>> >
>> >
>> >
> 



0
10/25/2004 3:21:16 PM
Reply:

Similar Artilces:

Auto Archive not archiving all items
I set a specific date but when I look back into my Inbox and subfolders, I still see messages that have a date stamp in which it was supposed to be archived. Please advise. Check the Modified date on the items that aren't being archived as you think they should. That's the date Outlook uses to determine whether or not an item is ready to be AutoArchived, and a simple action such as moving the item to another folder can change the Modified date. More information and a list of actions that change the Modified date can be found here: http://support.microsoft.com/default.aspx?scid=k...

Disaster Recovery #5
Hi, hopefully this is an easy question to answer. We have 2 offices, 1 in SF and 1 in NY whose exchange stores get backed up everyday. What if the exchange server in NY gets destroyed but we want to quickly restore mailbox access. How can we quickly setup a server with all the mailboxes of the dead server but without all their mail? This is assuming we'll restore the mailboxes eventually from tape. Have a live Exchange server sitting idle in SF. When you are ready to move the NY users WITHOUT their mail to new blank mailboxes, simply highlight them all in AD->Exchange Tas...

Pivot Table Formatting #7
Some of the formatting on my Pivot Tables remain after refreshing, some formatting does not. I have "preserve formatting" checked, "Autoformat Table" unchecked. Excel 2002. Any help would be appreciated - I have had formatting problems with Pivot Tables for years!! You may have to enable selection (From the Pivot toolbar, choose PivotTable>Select, and click on Enable Selection) Before formatting cells, use the selection feature to select the cells. For example, move the pointer to the top of a column in the pivot table (just above the column's heading cell...

Adding Blank Rows after the last Detail of the Report
Hi All, I've used this code from Dwayne: Private Sub Report_Page() Dim intNumLines As Integer Dim intLineNumber As Integer Dim intTopMargin As Integer Dim ctl As Control Dim intLineHeight As Integer intNumLines = 12 intTopMargin = Me.Section(3).Height intLineHeight = Me.Section(0).Height For Each ctl In Me.Section(0).Controls For intLineNumber = 0 To intNumLines - 1 Me.Line (ctl.Left, intTopMargin + _ (intLineNumber * intLineHeight)) - _ Step(ctl.Width, intLineHeight), , B Next Next End Sub My report needs to print blank rows (at least...

Adding hyperlinks with parameters
Hey everybody I have a batch file which needs to be run from an excel sheet with a parameter, like this: c:\1.bat myParameter But when i try to run the Hyperlink, the Excel shows an error message saying it can't open the specified file (probably because the is a space between the file and the parameter) is there any known way to run the link from the excel? On Mar 2, 12:45=A0pm, Pasha <pavel_v...@mailto.mod.gov.il> wrote: > Hey everybody > I have a batch file which needs to be run from an excel sheet with a > parameter, like this: > c:\1.bat myParameter > But when i ...

outlook vcard, ad integration user properties
my boss is trying to get hix fax# in his vcard. he is using his address from the global address list I have modified his profile in active directory users and computers: I go into AD users and computers, double click on his user, go to the telephones tab, and enter his fax #. but when I did this his fax # is still not being pulled up in his outlook vcard. Does anyone know where outlook is trying to get this field from / how i can get this field into his vcard? thx ...

ADDING A NUMBER
how do i add a number to a range of cells? I need to add 11.27 to a number of different cells each with a different number in them Put 11.27 in an empty cell, format it the same way as the numbers you want to add to, copy it, then select the numbers you want to add to and do edit>paste special and select add. -- Regards, Peo Sjoblom "Helpme" <Helpme@discussions.microsoft.com> wrote in message news:6D51344A-78E6-4377-B292-FC6C16FF6BA2@microsoft.com... > how do i add a number to a range of cells? I need to add 11.27 to a > number > of different cells e...

Default PO Price Different From Cost Prices in Item Card
The standard cost, current cost and the orginating invoice cost in the item card are all the same (£2.11). When creating a PO, the correct Unit Cost appears as long as the quantities have not yet been changed. However, once a quantity has been entered, the Unit Cost changes to another figure (£12.89), which we're not sure where it's being pulled from. Has anyone experienced the same problem or have any thoughts on this matter? Thank you If you have ordered this item before from the same vendor, you will have a vendor item card. That card records the last price...

Question abount sent items
Hello all, I know this is by design but I am asking the question anyway. When I associate someone elses' mailbox to my account and send an email on their behalf, Is there a way to make the sent items appear in their mailboxes instead of mine? Thanks in advance ...

adding new records
I am totally new to CRM, so I hope this is really easy question: This concerns permissions.. I have a "sales" group, and with one of those people i need to be able to let them add new records on behalf of other "sales" people. Is there like a standard permission setting for it? (obviously every "sales" person can add new records if they select them selfs as the owner) thanks, Michal. Hi, By default the person who creates the record will be the owner. After record creation the person could reassign the record (manually) to another user. If all rec...

When adding attachments...
....in Outlook the following errors comes up: "Out of memory or system resources, please close some programs and try again" Quotas are fine. I have deinstalled/reinstalled Office, cleaned 'temp' areas, and many other tidbits. Any other ideas? Thanks. This might help as i had this problem with Outlook 98. Is the file you are trying to copy to attach nested in sub folders? if so try and copy the attachment to a root drive like c:\ Ignore previous email. wrong spellin if the attachment is nested in sub folders(this means you have to open different folders to get to ...

??WINDOWS 7 Discussion Groups
microsoft.public.windowsxp.general Is for XP microsoft.public.windows.vista.general Is for Vista Which Group us is for 7 Microsoft is transitioning from newsgroups to the new web-based forums. For Windows 7, please see: http://social.answers.microsoft.com/Forums/en-US/category/windows7 BoazBoaz wrote: > microsoft.public.windowsxp.general > > Is for XP > > microsoft.public.windows.vista.general > > Is for Vista > > Which Group us is for 7 On 8/1/2010 1:56 AM, BoazBoaz wrote: > microsoft.public.windowsxp.general > >...

Top 5 SQL in an Aggregate Query
I'm counting occurrences for Questions Grouped by Market Mgr and 3 different Area Mgrs. Taking "Top 5" in the SQL statement brings in the overall Top 5 records, which it should. I could run code to examine each Area Mgr (w/ the Market Mgr), build a Top 5 and add to a Table after deleting all those Table's records prior to examining each Area Mgr. Or..is there another way?? Any possibiliity the "Grouping" in an Access Report would display only the Top 5 for each Area Mgr grouping? TIA - Bob See: Subquery Basics: TOP n records per group at: http://a...

Picture Disappears When Added To Contact In Outlook 2003
Can someone help please. When I try to attach a picture to a contact in outlook 2003 immediately I double click the picture to be attached it disappears out of the outlook contact along with the placement holder in the form. Only when I right click the mouse and go remove picture do I get the placement holder back. I have looked at all the help menus but they offer no clues. Thanks TS ...

Exchange 5.5 POP3 Connector?
Hi i would like to know if anyone can recommend a good POP3 Connector for Exchange 5.5. Most Connectors work with 2000/2003. I really have a huge problem in that our Exchange Server 5.5 is purely used for internal company email. All have POP3 Accounts that send and receive externally. Because our Exchange 5.5 Server is not on the Internet we have a problem when external sources save our addresses and it shows with a .local extension instead of our POP3 registered .com extension. Is there a way of not having to choose which account whether it is external or internal in Outlook knowing i...

Adding ActiveX to dialog with wrapper
When I add an ActiveX object to a dialog using the dialog editor - right click - insert activeX object, the help on the resulting activex selection tool states that a wrapper will not be added by using this method. If you need a wrapper, it suggests using the class view. This is using Visual Studio 2005. I'm having some problems with this on an existing project. To make sure I understand the process, I created a new MFC project, added a dialog, created a class for that dialog and added a Flexgrid object using the right click method in the dialog. I then added a variable for the flexgrid...

Sort by: Site ID/Item Number/Bin for Stock Count Entry Screen
Would like an additional sort selection in the Stock Count Entry Screen. Sort by: Site ID/Item Number/Bin ---------------- This post is a suggestion for Microsoft, and Microsoft responds to the suggestions with the most votes. To vote for this suggestion, click the "I Agree" button in the message pane. If you do not see the button, follow this link to open the suggestion in the Microsoft Web-based Newsreader and then click "I Agree" in the message pane. http://www.microsoft.com/Businesssolutions/Community/NewsGroups/dgbrowser/en-us/default.mspx?mid=7e69d84a-032e-4f61...

Any one seen this BUG in Matrix Items.
Hi All, I have come across what I think is a bug in RMS Matrix Items occurring when the description of the dimensions contain a single inverted comma ('). Take this example:- Matrix Item called: Magazine ItemLookupCode: MAG Single Dimension called: Title Add any item and set the Title column to somethin like: Jason's Adventures. Save the Matrix Item. Sell the Item MAG in POS, The matrix selection screen appears - choose the Item Jason's Adventure, then crash with this error and POS Closes. "Run-time error '3001' Arguments are of the wrong type, are out of accepta...

GP 10 Upgrade error eone excelbuilder gpaddin threw an exception
I ran my live GP10 install tonight. Everything on the server ran fine but when I tried updating my own pc, install runs, I can launch Utilities, but when I try to log in I get this error message: "eOne.Dynamics.GP.ExcelBuilder.Engine.dll: Exception has been thrown by the target of an invocation. InnerException: The type initializer for eOne.Dynamics.GP.ExcelBuilder.GPAddIn threw an exception." My pc is XP Pro, SP3 with Office 2007. Any ideas on how to get past this? Thanks, DavidF. I figured out the problem. One of my modified dictionaries didn't upgrade. I reran utili...

Adding alternate columns
I work on a schedule where I record ticket count and ticket sales for each show, listed chronologically. Column A = week ending date Column B = # Tickets sold for April 5 show Column C = Ticket Revenue for April 5 show Column D = # Tickets sold for April 9 show Column E = Ticket Revenue for April 9 show Column F = # Tickets sold for April 12 show Column G = Ticket Revenue for April 12 show Column H = Total # Tickets sold for all shows Column I = Total Ticket Revenue for all shows In the Totals columns, the Total Tickets formula is "+B4+D4+F4", and the Total Revenue f...

Adding fields from a different query
I have a form built based on a main query. How do I add more fields on that form that come from a different query? Anne A couple possibilities... Change your first query to include the extra fields. Use your second query to "feed" a form, then embed that form as a subform on your main form. Good luck! Regards Jeff Boyce Microsoft Access MVP -- Disclaimer: This author may have received products and services mentioned in this post. Mention and/or description of a product or service herein does not constitute endorsement thereof. Any code or pseudoco...

GP 8.0 Slow
I have a problem I don't know how to fix. We are in "Apply Sales Documents" We do a FIND to get a document number. The whole application locks up, the screen goes grey and patchy and it can take 5-7 mins to return records. This is the situation for our 3 largest customers. The last time we sent anything to history wss 12/2006. It's the financial departments view that we should be able to keep 1 year current without having to move to history. However about1 month after moving things to history things slowed down again now its PAINFUL to get anything to return. The perso...

Exchange Server 5.5 Help #2
Hello, Is there a way to set out of office reply on the email server rather than at the client's machine? because when the client's machine is off, no reply will be sent. I am using exchange server 5.5 with internet mail connector. Thank You leo7802@hotmail.com (Leo) wrote: >Hello, > >Is there a way to set out of office reply on the email server rather >than at the client's machine? because when the client's machine is >off, no reply will be sent. I am using exchange server 5.5 with >internet mail connector. > >Thank You Out Of Office messages are c...

Adding more than three Conditions to 'Conditional Formatting'
Can i add more than three conditions to the conditional formatting presets using code? Regards [Riz] -- Rizitsu ------------------------------------------------------------------------ Rizitsu's Profile: http://www.excelforum.com/member.php?action=getinfo&userid=15840 View this thread: http://www.excelforum.com/showthread.php?threadid=320382 Riz, as you have found out, only 3 conditions with conditional formatting. But yes you can use some code to get more than 3, try this it will change the cell color in column A when you put in one ,two, three, or four, right click on the she...

Windows Mobile 5.0 GAL Lookup
How can I configure a windows mobile 5.0 device to use the GAL as well as their contacts when searching? thanks. GAL lookup isn't available unless you have AKU 2.0/MSFP and Exchange 2003 SP2. Otherwise, I believe that mobile Outlook allows you to set up an LDAP address book, but LDAP isn't usually published to the Internet on DC's (nor would I usually recommend it). -- Ben Winzenz Exchange MVP MessageOne Read my blog! http://winzenz.blogspot.com http://feeds.feedburner.com/winzenz (RSS Feed) "Gabe Matteson" <gmattesonATinquery.biz> wrote in message new...