0 votes

Hi,

I need to add ActiRelations in EditRelationsList.Oppo and I know that I have some SQL statements to execute in SQL Server. I'm trying to understand how the system tables work
Can you tell me if I am right or explain to myself:

SYSTABLES: Contains all existing tables in SQL Server. Efficy Designer uses it when the DB is "upgraded" (create/drop table)
SYS
FIELDS: contains all the fields of each table (and virtual fields). Efficy Designer uses it when the database is "upgraded"
SYSRELATIONS: Efficy uses this to join different tables (and specify whether there is a join table)
SYS
QUERIES: Efficy uses it to generate queries for obtaining data in Consult
SYSTABLEVIEWS: Efficy uses it to generate queries for obtaining data in Edit
SYS
ENTITYVIEWS: Contains collections of TABLESVIEWS to know which data to enter in which view
SYS_RELENTITIES: *I do not understand ??*

Sorry if I did not speak clearly but it's a little vague for me

I'm asking because I need to add ** ActiRelations ** to ** EditRelationsList.Oppo **.
I found a sample script that adds the OBJVPROF relationship with SQL statements. I'm trying to create my script from them.
But it contains the following SQL statement:
insert in SYS
ENTITYVIEWS (NAME, ISCUSTOM, TABLEVIEWS) values ('ObjvProf', 1, 'ObjvProf')

I looked for the relation Acti-Mail in this one and I can not find any entry ActiMail or MailActi

For the moment, my script looks like:

-- add Actions in OppoEdit
Update SYS_ENTITYVIEWS set ISCUSTOM=1, TABLEVIEWS=(SELECT TABLEVIEWS FROM SYS_ENTITYVIEWS WHERE NAME = 'OppoEdit') + ';Oppo_Acti=Acti' where NAME='OppoEdit' 


-- Get Acti data from OppoEdit
insert into  SYS_TABLEVIEWS (NAME, K_TABLE, ISCUSTOM, SELECTFROM, SELECTFIELDS, SELECTJOIN, SELECTORDERBY) 
values ('Oppo_Acti', @K_TABLE, 1, 'ACTI_OPPO ACTI_OPPO, ACTIONS ACTIONS', 'ACTI_OPPO.*, ACTIONS.SUBJECT, ACTIONS.D_BEGIN, ACTIONS.DONE', 'ACTI_OPPO.K_ACTION = ACTIONS.K_ACTION', 'ACTIONS.D_BEGIN DESC, ACTIONS.SUBJECT');
asked in Efficy/ Client side by (259 points)

1 Answer

0 votes

It seems like a bad idea to add actions in the edit of an opportunity, for three reasons:

  1. Actions are not avaiable as editrelation in any other standard entity that also has a consult mode
  2. The concept of a main action doesn't seem valid in an opportunity
  3. Opportunities typically collect many actions, and the detailgrid is not designed for a high amount or records.

Conclusion, don't do it

answered by (7.4k points)
Thanks for your answer.

I know your points 1 and 3 and I said that to my customer, but he told me that Opportunities will only have one action
What do you mean with your point 2 ? If the table has the field "MAIN" (which exists as standard in ACTI_OPPO) why it will not work?
A customer only wants functional answers, don't let him decide the technical solution. Refuse the request and find a standard alternative
Many customers and users take the bad use to go in edit mode for data consulting and then ask to have more relation in edit mode.
Maybe one of the reason is that he didn't see all he need to see in consult mode, in this case, propose him to display what he need in consult mode.
1,246 questions
1,517 answers
1,858 comments
328 users