vTiger 7 Custom Entity Module Not displaying data - crm

I am using vTiger 7 and creating a custom Entity Module using vtlib/tools/console.php but somehow when i save the data it shows me error "Record You are trying to access is not found" although it saves the data in tables but when i try to show the data it shows the same error.

I had same issue and I solved the problem by creating a table manually.
See the schema of table vtiger_leads_user_field to create new table having same schema.
Create new table as vtiger_<your entity module name>_user_field. In vtiger 7, when you create new module the vtiger_......._user_field table is not being created.
Some other problem also with vTiger 7 but I think this problem i solved by just creating a table in DB, which must be created automatically by vtiger 7.
NOTE: I created my module using custom PHP script (Module Creator).

Related

Adding New Table in Product Entity ax 2012 r2 DMF/DIXF

Can some one please help me with Steps for Adding new table in Product Entity. I have a table msftInventTable
msftInventTable where msftInventTable.InventTable == InventTable.Recid;
Along with importing data into Product, InventTables I would like to import data into this table too using Product Entity.
Can someone please help me with the steps to do? I tried to add it in the query and tried with adding fields in Staging and all steps, but i dont understand what i am missing. I am unable to import data into this table. So Temporarily, i have used coding in insertUpdate method to import data. But this will impact performance , so I need some inputs.
Please help.
Thanks.
This is not a programming question since Microsoft have a wizard for creating custom entities.
Create a new entity called msftInventTable. You don't have to create code for this. In the "Data import export framework" module under Common there is a function called "Create a Custom entity for data import/export".
Follow the wizard for your custom table. All the DMF classes, tables and setup is created automatically.
Add your custom msftInventTable entity to the same processing group as your Product entity:
Setup the new entity and run the import for the processing group.

Adding table from another database to ASP.NET Dynamic Data + Entity Framework

I have a table in another database I would like to scaffold via ASP.NET Dynamic Data and incorporate into my existing Entity Model - is there anyway to do this? (eg using a view or other mechanism or customize the view, edit or insert operations via ad-hoc SQL or stored procedures?)
I don't want to replicate the entire DynamicData sub-folder structure and create another entity model for just one table
I was able to solve this by manually creating an entity in the SSDL and CSDL sections of the .edmx file by using a DefiningQuery and then defining the EntitySets for my entity class
I also added insert / update / delete Function elements to the SSDL with inline SQL using the CommandText property
At this point I had enough to let the Designer map the CRUD methods to these inline SQL functions I defined
It's a little tricky but it works and the general approach opens up many possibilities I had not thought about

How do I define a database view using Entity Framework 4 Code-First?

How do I define a database view using Entity Framework 4 Code-First? I can't find anything about this anywhere!
That's because you cannot define database view using code-first approach. Database view is database construct which uses SQL Query on top of existing tables / functions. You can't define such constructs using code first.
If you want view you must create it manually by executing CREATE VIEW SQL script for example in custom initializer - it will be similar like this answer. Just be aware that this will not help you if you want to map entity to a view. In such case you would probably have to first drop table created by EF and create view with the same name (I didn't try it but it could do the trick). Also be aware that not every view is udpatable so you will most probably get read only entity.
To do a view you create the model, then in the initializer you run the SQL statement to create the view directly against the context with the first line of code, and then in the context you override OnModelCreating and run the second line of code to ignore the model.
context.Database.ExecuteSqlCommand(Resources.<resourcename>);
modelBuilder.Ignore<modeltype>();

Custom Action when specific node-type content is created in drupal 6?

I have a requirement where the admin will upload an excel file to the site. Once the file is uploaded the data has to be imported to a table. And data from the table will be synchronized to nodes if they are present else new node is created. My question is i can do the synchronization using hook_cron but i have to import the data of excel file to a specific table on creation of node. How can i fire a custom action on a specific node type of node creation in drupal 6?
You can use hook_nodeapi with the $op of insert.
You will get a reference of the node, where you can test the node type and do what you need to do.

SugarCRM 5 - Create a sub-panel for invoices in Account Panel

I'm customizing a SugarCRM 5, and in my SugarCRM database I have all invoices which were imported from our ERP. Now, I would like to know if it is possible to create a new sub-panel in the Accounts Panel without editing the original SugarCRM files, so that my client invoices index are visible in that interface.
Last time I checked, you could use the module builder to extend the interface. From 5.0 (or maybe 4.x) on, Sugar added all those APIs, which should enable you to extend SugarCRM without hacking it in and losing it with the next upgrade.
Hope that helps!
You can create a new module - Invoices using Module Builder and then add relations between Accounts and Invoices. The subpanels will appear for both - Accounts and Invoices without any coding. You should just customize the columns again using Module Builder.
as stated above, create invoices module to hold all your invoices, but before doing import make relationship with accounts and map the account field when importing so the invoice is automatically connect in subpanel and shown
Basically, the Account name should be a related field in your new invoices module (base the module creation on something like QUOTES that has similar fields. Once you create the module (so simple you can almost guess your way through it in the ADMIN section) and the fields you like (using Studio) just add the RELATED field Account Name and the sub-panel will be established in your ACCOUNTS module and the invoice will magically populate, especially if you re-install them using the import feature from a CSV file (spreadsheet).
You can create sub-panels in account modules details view by just giving relationship within two modules. Create a one-to-many relationship from Account module to Invoices module.

Resources