The Forums on slxdeveloper.com are now retired. The forum archive will remain available for the time being. Thank you for your participation on slxdeveloper.com!
|
|
Insert Account Manager to Account View
Posted: 19 Nov 07 12:33 PM
|
I want to ADD to the Account view ( Multi Account Managers ) - i was create a table ID , AccountID, ContactID , USERID How a can create a grid under the account view to add more than on e account manager to my Account ?
Thanks
Atmane
|
|
|
|
Re: Insert Account Manager to Account View
Posted: 20 Nov 07 2:54 PM
|
Hello, Can some one have an example Account --> any table ( one-to-many) to get the Datagrid for the child table and how i can add a new record ?
Thanks
satmane |
|
|
|
Re: Insert Account Manager to Account View
Posted: 29 Nov 07 11:17 AM
|
Did you go into the Database Manager and add a 1:many table? ACCOUNT_USER or something like that?
Then in Application Architect you need to add the entity.....then the relationships, etc......
RJ Samp |
|
|
|
Re: Insert Account Manager to Account View
Posted: 30 Nov 07 7:07 AM
|
IF one is using 7.2.1 (SP1 based web).. you can build the new table at the same time as building the rest of the entity using the new wizards. .. and all from the AA. Just don't forget to handle the relationship too or groups will not work. -- rjl |
|
|
|
Re: Insert Account Manager to Account View
Posted: 30 Nov 07 9:06 AM
|
Bob,
what is the proper way to handle relationships for a side table. Here's what I have been doing (assuming that I have the ACCOUNT table and my new table ACCOUNTPROJECT that links on the ACCOUNTID field back to the ACCOUNT table, and the ACCOUNT->ACCOUNTPROJECT is 1->M)
For the ACCOUNT table:
1. Expand the ACCOUNT entity 2. Right-click the "Child Properties" node, select "New Relationship" 3. On the left is the parent entity (Account) and I select the "Account Id" property 4. On the right, I select AccountProject from the "Child Entity" drop down and select the "Accountid" property 5. I set the "Cardinality" drop down to 1:M and set Cascade to the desired value (I usually leave default as "SaveUpdate") 6. Press Ok, which will bring you to the "Relationship" tab 7. On the "Relationship" tab, I check the first "Include in Entity" checkbox 8. In the Area designated as "Account" I set the "Property Name" to AccountProject and "Display Name" to AccountProject, Cardinality and Cascade remain unchanged. 9. I uncheck the second "Include in Entity" checkbox *** I'm not sure what that does, but i think it's for automatically creating a relationship back up to Account from AccountProject; however, when I do it that way, I never see relationship displayed in the "Parent Properties" node of AccountProject - maybe it's bugged? 10. Save and Close
For the new ACCOUNTPROJECT table: *** Note, that I'm not sure if this is necessary, but it seems to work better to add an aditional Child Relationship M:1 back up to ACCOUNT rather than using the second "Include in Entity" checkbox of the ACCOUNT->ACCOUNTPROJECT relationship.
1. Expand the ACCOUNTPROJECT entity 2. Right-click the "Child Properties" node, select "New Relationship" 3. On the left is the parent entity (AccountProject) and I select the "AccountId" property 4. On the right, I select Account from the "Child Entity" drop down and select the "Account Id" property 5. I set the "Cardinality" drop down to M:1 and set Cascade to the desired value (I usually leave default as "SaveUpdate") 6. Press Ok, which will bring you to the "Relationship" tab 7. On the "Relationship" tab, I check the first "Include in Entity" checkbox 8. In the Area designated as "AccountProject" I set the "Property Name" to Account and "Display Name" to Account, Cardinality and Cascade remain unchanged. 9. I uncheck the "Nullable" checkbox 10. I uncheck the second "Include in Entity" checkbox 11. Save and Close
***
I'm hoping I have been doing this correctly; however, I have a feeling I'm not following all of the steps because I don't always get a good child->parent relationship in code. Perhaps, I need to manually create a new relationship from ACCOUNTPROJECT back to ACCOUNT by right-clicking the "Parent Properties" node beneath the ACCOUNTPROJECT entity.
Any suggestions or comments are greatly appreciated. I'm trying to develop my own process for using the Application Architect seeing as there are a million undocumented features and processes available to developers. Can anyone say, "SLX 7.2 Web Development: The Unwritten Manual" book?
|
|
|
|
Re: Insert Account Manager to Account View
Posted: 30 Nov 07 5:45 PM
|
Sounds like you are doing it the longhand and hard way.. Are you using 7.2.1? (7.2 w/SP1 installed?).. If not.. upgrade immediately (follow the instructions EXACTKY) oon doing the upgrade.. do NOT wing it!.. and use the new wizards to do this work for you.
-- rjl |
|
|
|
Re: Insert Account Manager to Account View
Posted: 03 Dec 07 8:41 AM
|
I am indeed running 7.2.1, upgrade went great and in fact fixed some issues with our database. I've used the Wizards, but they don't seem to create the child relationships. Perhaps our tables were not built or upgraded correctly when we upgraded from 5.2.
Yeah, we've been running 5.2 without ever upgrading and 7.2 is our first upgrade in over 5 years. |
|
|
|
Re: Insert Account Manager to Account View
Posted: 04 Dec 07 7:52 AM
|
Just 10 minutes ago I created a new 1:1 entity using the new "Web Wizards" (took just a minute or two.). They do create the relationships.
The recommended practice now is to create ONE two-way relationship rather than two "single" relationships.. much cleaner and the wizard(s) do just this.
Oh yes, did you let the wizard create the new table(s) and fields too? This is the best way since now the new table becomes a "managed entity" (from the AA's point of view). When you do a "normal" web bundle (on the new entity) it picks up the table/fields and you do not have to do a separate "table" bundle.
-- rjl |
|
|
|
Re: Insert Account Manager to Account View
Posted: 23 Jan 08 9:28 PM
|
Thank you for pointing out the second option for the wizard. I was having a hard time understanding how to setup a 1:1 entity relationship in 7.2.1. I did run into a challenge after it created the table and entity. I built the interfaces. Went to use the form wizard to create a new data grid form based on the new entity/table and the fields would not show up for me to select. I ended up deleting the entity (does not delete the table in db) and creating it again using the first option in the wizard basing it on the existing table and everything worked fine. |
|
|
|
Re: Insert Account Manager to Account View
Posted: 18 Feb 08 4:44 AM
|
If you are also wanting to have security based on the custom table called Account_User i.e multiple account managers then you will need to write SLX Security wrappers or a dot net application. For other entities where security is not involved the normal customization would hold good. |
|
|
|