SCM missing reference - package

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.

Related

Shopware 6 : [Error] Call to a member function getStorageName() on null

I want migrate some tables into Shopware 6 database. When I run this commande line
bin/console dal:create:schema
I get this error : [Error] Call to a member function getStorageName() on null.
How can I solve this bug ? Could you help me please ?
There's only one instance I can think of where this error might occur. It must be introduced by a plugin since this error would be caught before any release in the core.
There is a new EntityDefinition or EntityExtension (Definition A) which adds a ManyToOneAssociationField. The association references another EntityDefinition (Definition B). Definition B has implemented the isVersionAware method to return true. If definition A now misses to add a ReferenceVersionField for definition B as well, this is when the field to retrieve the storage name from would remain to be null, causing the error.
You can find the corresponding lines of code in the SchemaGenerator.
For a correct implementation you can find the OrderAddressDefinition which adds both a ManyToOneAssociationField, as well as a ReferenceVersionField for the OrderDefinition (which is version aware). If you were to remove the ReferenceVersionField you could reproduce this error without any plugins as well.
Either look at all the instances of EntityDefinition/EntityExtension within the plugins or try deactivating plugins one by one and try creating the schema again, until you find the plugin causing the error.

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.

How do you reference a field in the Embedded Code of an SSRS report

Is there a proper way to reference the fields of a ssrs report from the embedded code of an ssrs report?
When I try to use Fields!Program.Value I get the following error --
There is an error on line 3 of custom code: [BC30469]
Reference to a non-shared member requires an object reference.
Upon googling I found you could reference the Parameters of a report by prepending Report. at the beginning. So I tried this Report.Fields.Program.Value.
That results in the following error...
There is an error on line 3 of custom code: [BC30456] 'Fields' is not a member of 'Microsoft.ReportingServices.ReportProcessing.ExprHostObjectModel.IReportObjectModelProxyForCustomCode'.
So... in summary, is there a way to reference the fields from the embedded code. I figured out I could pass the field vals to the function itself but I would prefer to reference the fields directly.
Seth
You have to pass it in as a parameter.
=Code.ToUSD(Fields!StandardCost.Value)
You do have two other alternatives to passing by parameter, though neither is very pretty.
(Beware! After I wrote the following paragraph I discovered defaults from queries are not supported in local processing mode so this first solution may not be viable for you as it was not for me.)
You can create a hidden report parameter with a default value set from a dataset, then reference this with the Report.Parameters!MyParam.Value syntax. You have to be careful when testing this, as (at least in BI studio 2005) the report parameters don't seem to get reliably re-initialised from the DB in the Preview tab.
Alternatively you can create a hidden textbox on the report with its text set from a dataset, and then reference the textbox from code. In this case you have to pass the ReportItems object as a parameter, but the slight advantage is that it is only ever one extra parameter. Be sure to strongly type the parameter when declaring it:
public Sub MyCustomCode(ri as ReportItems)
The code will work in BI studio without the type declaration but for me it caused errors with the report viewer control in local processing mode if 'as ReportItems' was not present.
In either case, this is only really useful for page level data, so functions for use in a table should still take parameters.

Resources