abp.io Problem add new record using CreateModalModel - abp

i am new to ABP.IO . while following the tutorial on abp.io to add book object i am getting this error DependencyResolutionException: None of the constructors found with 'Volo.Abp.Autofac.AbpAutofacConstructorFinder' on type 'hpDeskv2.Web.Pages.Products.CreateModalModel' can be invoked with the available services and parameters:
Cannot resolve parameter 'hpDeskv2.Products.IProductsAppService productAppService' of constructor 'Void .ctor(hpDeskv2.Products.IProductsAppService)'. I could not get the modal to popup for inserting data.
Hope somebody would kind enough to help me
Thanks

Related

SCM missing reference

How can I find the package necessary to reference in my model por a returned type like
smmActivityPurpose
Thank you
I compare the packages referenced in the original form, but when I create a new one and use the same data, get the following error:
edit method 'psAeditActivityPurpose' defined on 'ProdTable', referenced in data source 'ProdTable' of form 'NewForm', returns type 'smmActivityPurpose', which is not recognized. Are you missing a module reference? TestForm (USR) [Cambrica] K:\AosService\PackagesLocalDirectory\bin\XppSource\Cambrica\AxForm_NewForm.xpp 0
The missing package reference relates to the type smmActivityPurpose.
First identify the package by searching its name in VS, then update the package refence.
It is all explained here.

React: declaration merging for react-table types doesn't work. Property doesn't exist on type 'TableInstance'

I'm facing an odd issue while implementing pagination for my react-table component. The problem is what you can see in the screenshot - Property X does not exist on type 'TableInstance:
So I found a similar problem that someone had before and I have used the approved solution: react-table pagination properties doesn't exist on type 'TableInstance{}'
The example file is also here: https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/react-table#example-type-file
The problem is that nothing has changed, I have described the file in the root folder and it seems that APP can't see it as you can see in the picture above.
I'm new to React, can someone help me with that? I was trying to find a solution by myself but I failed :(
Just add a triple-slash directive path pointing to the react-table-config.d.ts file so the types get augmented. It's going to be something like this:
/// <reference path="./react-table-config.d.ts" />
Including it in one place is already enough. No need to add it to every file that uses react-table.

get InvalidSObjectFault [ApiQueryFault [ApiFault exceptionCode='INVALID_TYPE'

Hey I am trying to create some object into salesforce. I have:
SObject myobj = new SObject();
myobj.setType("MyType");
...
But I got:
exceptionMessage='sObject type 'string' is not supported. If you are attempting to use a custom object, be sure to append the '__c' after the entity name. Please reference your WSDL or the describe call for the appropriate names.'
I didn't just put a 'string' there.
Anyone please give some suggestions?
Thanks a lot.
You don't say what you're trying to do by assigning the type, but it looks like you cannot set the type of an sObject in this way. The "string" the error is complaining about is the string "MyType" that you are trying to use to set the type of the sObject.
If you look at the page that describes the methods for sObjects,
http://www.salesforce.com/us/developer/docs/apexcode/index_Left.htm#CSHID=apex_methods_system_sobject.htm|StartTopic=Content%2Fapex_methods_system_sobject.htm|SkinName=webhelp
you will see that there is no "setType" method, only a "getType" method.
Why do you want to do this ? do you have the type in a variable that you want to use to create an object ?
There is a setType() method when using the Partner API. Is this what you are doing?
In this case you just need to follow the exception message. All custom objects have a API name that end with "__c".
Try
myObj.setType("MyType__c");
The error you see can also happen in a completely different way. I found your question while trying to solve my problem with InvalidSObjectFault. In my case, it was not in how I specified the sObject's type. No. It was permissions. One user (Admin) could run the query but another (my API user) couldn't. Turns out the user's profile needs to have permissions set to see the object. If not then you get this fault message!
Posted more about this on my blog:
http://sforcehacks.blogspot.ca/2013/11/invalidsobjectfault-invalidtype.html

Creating plugin for Django-CMS

I think I screwed up somewhere while trying to create a django-cms plugin and now I am unable to go back. The plugin (called sbbplugin) seems to be "working" (it gets displayed) but whenever I try to publish the site I get the following error:
DatabaseError at /admin/cms/page/18/publish/
relation "cmsplugin_sbbmodel" does not exist
LINE 1: ...id", "cmsplugin_sbbmodel"."cmsplugin_ptr_id" FROM "cmsplugin...
^
I tried removing the plugin but I can not do it because the page is not published. My plugin has no models or anything. Also I'm unable to remove the plugin from the page by clicking delete. Seems like the database is broken. Since I am not experienced enough to know what information you need I would appreciate it, if you could give me further instructions on what I should do.
Update: I think the problem is that I tried to use a model (sbbmodel) which I deleted. Should I try to add the model again? If so what should I do to fix the database? Do I have to run a migration for my app? Do I even have to register the plugin as an app?
Update2: So I tried to add the model again and migrate the app but I get the following error:
CommandError: One or more models did not validate:
sbbplugin.sbbmodel: Accessor for field 'cmsplugin_ptr' clashes with related field 'CMSPlugin.sbbmodel'. Add a related_name argument to the definition for 'cmsplugin_ptr'.
sbbplugin.sbbmodel: Reverse query name for field 'cmsplugin_ptr' clashes with related field 'CMSPlugin.sbbmodel'. Add a related_name argument to the definition for 'cmsplugin_ptr'.
S.sbbmodel: Accessor for field 'cmsplugin_ptr' clashes with related field 'CMSPlugin.sbbmodel'. Add a related_name argument to the definition for 'cmsplugin_ptr'.
S.sbbmodel: Reverse query name for field 'cmsplugin_ptr' clashes with related field 'CMSPlugin.sbbmodel'. Add a related_name argument to the definition for 'cmsplugin_ptr'.
which I do not really understand because I never specified a foreign key. I assume it is because I inherit from CMSPlugin. Any help?
I finally fixed it. First I removed every file that I created for my plugin. Then I deleted every instance of my plugin that was saved in the database. Unfortunately that did not solve the problem and I was still getting the same error even after restarting the server.
What did the trick was to go into phpPgAdmin and select all tables than choose "correct". It did not tell me what exactly the issue was but afterwards everything was back to normal again. So if you somehow run into the same problem, just "correct" your database automatically.

DataContract IsReference only working one way?

I have a base class from which all my model classes inherit - Entity. Entity is decorated with
[DataContract(IsReference = true)]
That worked with going from client to server (a save operation). But I'm now getting the same error I was before I added IsReference when going from server to client (a get operation). Any ideas?
Edit:
The error is:
There was an error while trying to
serialize parameter
http://tempuri.org/:GetResult. The
InnerException message was 'Object
graph for type
'Current.Entities.LazyList`1[[Current.Entities.SubPart,
Current.Entities, Version=1.0.0.0,
Culture=neutral,
PublicKeyToken=null]]' contains cycles
and cannot be serialized if reference
tracking is disabled.'. Please see
InnerException for more details.
Edit:
Shoot, I answered this but have since deleted it. I thought I fixed it due to something else I did in the project. I was wrong, this is still causing me an issue. I have a little bit more information - the server-to-client error only happens if an entity in the object graph contains a non-empty LazyList of children. If the list is empty then there's no problem.
Enabling the http://msdn.microsoft.com/en-us/library/system.runtime.serialization.datacontractserializer.preserveobjectreferences.aspx flag should fix this. (The flag also exists on DataContractSerializerOperationBehavior -- in config, via the DataContract attribute, and via any custom behaviors you inherit)

Resources