How to access new user defined DAC - acumatica

I'm having an issue, I created a custom table, added it to my customization project as a new DAC. The code is there, but how do i call this in a graph? I tried instantiating it as its own object, tried performing a pxselect, creating it as a viewname. None have worked for me, I looked through the documentation for "Generating a Data Access Class" And that doesn't apply to the ERP framework i get errors trying to generate class via that process.
Any ideas on how i should implement the new DAC to be accessible in my graph?
Thanks!

Found the solution, I incorrectly called my PXselect initially.
public PXSelect<UsrKSPOReceiptWeightSplit> WeightSplits;

Take your extension class from the AppRuntimeCode folder and cut/paste to your VS project folder. From there you can access your custom fields etc. Today in the Acumatica framework this is the procedure until this is fixed in the future. In the T300 manual this is covered in detail.
Here's a summary:
1. In Customization Mgr - create your data extensions
2. In VS copy the files that CM creted to your project to get a reference
3. Compile your extension library
4. When publishing your project you will have to delete your Customization extensions because there will be duplicates when you created your extension lib in VS.

Related

Where does Orchard CMS stored content definition?

I am fairly new to Orchard CMS.
I am going through how a module is created an got a question.
According to the documentation, content definition could be created in two ways:
use admin content definition page
create module project in visual studio
is there any difference?
I created a test content definition and try to find it in the SQL compact database. I can't seem to find it.
Anyone know where that info is stored?
Thanks
You can find the content definition in the following tables in the Orchard database:
Settings_ContentFieldDefinitionRecord
Settings_ContentPartDefinitionRecord
Settings_ContentPartFieldDefinitionRecord
Settings_ContentTypeDefinitionRecord
Settings_ContentTypePartDefinitionRecord
The admin interface uses the same APIs that are used when defining content definition from code, so it's basically the same thing. I tend to define content definition in migrations, as that's the best way to ensure that content definition changes are properly applied on all instances of the application (the migrations automatically run during application startup). The admin interface is intended for users who do not have access to the source code (ex. administrators, not developers).

Create Form Template from existing ones

Is there any way that I can create a template within forms to utilize for every user in the company?
For instance; let's say I have the Sales Order Screen (SO301000) and the Document Detail grid configured in certain way, that display different amount of columns than the default (either more or less columns).
For each user I want to use this template (and all the ones created) that I will apply when I add the new user.
I'l appreciate any guidance and help.
EDIT:
I provided answer for Form element ASP template below. Although reading your question again I think what you're trying to do would be more along the lines of automating grid column configuration. We call this feature Default Table Layout.
There's a feature request for it here:
https://feedback.acumatica.com/ideas/ACU-I-415
The feature has been shipped in version 2017R2 and is documented here:
https://help.acumatica.com/(W(1))/Main?ScreenId=ShowWiki&pageid=30f3229f-20f1-4055-9c03-e0fe3b37080d
Image copy of documentation page:
For ASP Form templates
There are two ways to work with customizations in Acumatica:
As a Customization Project, everything is done directly in Acumatica
instance through the web browser using the Customization Project Editor.
As an extension library (DLL file) compiled in Visual Studio which is then included in the FILES section of a Customization Project.
For method 1, I believe creating custom templates would be a bit of a hack and would not be officially supported, if someone knows otherwise please chime in.
For method 2, we ship the Visual Studio templates with the Acumatica Configuration Wizard (Acumatica ERP Installer).
Those templates are in the following folder:
My Documents\Visual Studio 20XX\Templates\ItemTemplates\Visual C#
The templates will be available for ASP.NET solution only. You can open Acumatica Instance Website as a solution if the website is already deployed:
When you open Add New Item dialog:
The Acumatica Templates will be available:
Those are standard Visual Studio templates so you can copy and re-use them to create your own. Microsoft documentation for creating user template applies and you can follow their guidelines. Note that working with Visual Studio and creating your own template is somewhat less user friendly than using Acumatica Customization Project Editor.
Acumatica T100 covers using Visual Studio to create customizations and would be a good starting point to learn the techniques involved:
https://openuni.acumatica.com/courses/development/t100-introduction-to-acumatica-framework/

Open custom user control in tool window using VS Package

I'm trying to create simple custom command (added in TOOLS menu option) to open the tool bar with custom control in VS 2013 using VS Package project.
I'm following https://msdn.microsoft.com/en-us/library/bb165987.aspx this guide but not sure why it's not working.
When I click on it, it opens tool window but without content under it. I want to show the MyControl.cs or custom control content under it.
I've tried a lot to find it out on Google but no relevent article found for same.
I've notice when I created new VS Package, it created "MyControl.xaml" file which loading it's data properly. I deleted that file and created new user control "MyControl.cs" which is not loading data.
Not sure if it requires VSIX project or VS Package. Is there any other way to do this?
Nothing in vsix development is simple at first. Try using this tutorial. It's from a series you can find here.
For you to show custom tool window content you have to extend the ToolWindowPane class and override the Window property returning your content as a IWin32Window. The tutorial fully explains it, and very well I might add, and the series is excellent even though it targets vs2010.

Unable to create Fakes for Google APIs

I am trying to create some unit tests for an app I am writing which consumes google APIs (in particular Calendar v3 (https://developers.google.com/google-apps/calendar/)
I right click on the reference to the calendar assembly and say "Add Fake Assembly"
This creates a .Fakes file in the Fakes directory, but does not create a Fakes assembly.
I'm using vs2012 ultimate, and several other developers have tried this as well, so its not a machine level thing. We even created a blank solution, added the calendar API via nuget, and then tried, and it had the same behavior.
No error shows up in the output window, no indication that it didn't work (other than it doesn't work!)
I ended up creating a wrapper interface, and wrapper concrete object for the calendar APIs, and then I can just use regular Mocks to write these tests.

Link to pimcore object from within plugin

I'm developing a plugin that I would like to link to the existing admin interface components - i.e. link from a grid view to an object crud screen.
I know I can do this using deeplinks like in the examples here.
However I want to maintain my open tabs.
Im using Pimcore 2.0 release. This I would have thought would be a standard feature in the admin section?
Anyone?
Cheers
You should handle grid item click and call pimcore.helpers.openObject(id, type);
For reference you can check onTreeNodeClick handler in pimcore.

Resources