Dynamics SolutionPackager.exe Value must not be null - microsoft-dynamics

I have a dynamics solution, which I want to pack using the SolutionPackager.exe from the dynamics SDK.
I am getting the error, that a value must not be null.
I am wondering what is expected in the Relationship.xml, if I do not want to change any entities. Any ideas on this?
After googling a while I only found argument null errors while using dynamics, like this: https://msdynamicsworld.com/story/resolving-error-value-cannot-be-null-issue-microsoft-dynamics-365-project-service-automation, but I cant get even close to that step.
PS D:\Source\github\D365-PowerKanban\src\web\Solutions\src> D:\Dynamics\SDK\Bin\SolutionPackager.exe /a:pack /z:D:\Source\github\D365-PowerKanban\package.zip /e:verbose
SolutionPackger : CRM Solution Packaging Tool [Version 8.2.0.820]
© 2012 Microsoft Corporation. All rights reserved
Packing D:\Source\github\D365-PowerKanban\src\web\Solutions\src to D:\Source\github\D365-PowerKanban\package.zip
Processing Component: Entities
Processing Component: Roles
Processing Component: Workflows
Processing Component: FieldSecurityProfiles
Processing Component: Templates
Processing Component: EntityMaps
Processing Component: EntityRelationships
Reading: .\Other\Relationships.xml
Processing Component: optionsets
Processing Component: SolutionPluginAssemblies
Unmanaged Pack complete.
Processing Component: Entities
Processing Component: Roles
Processing Component: Workflows
Processing Component: FieldSecurityProfiles
Processing Component: Templates
Processing Component: EntityMaps
Processing Component: EntityRelationships
Reading: .\Other\Relationships.xml
Processing Component: optionsets
Processing Component: SolutionPluginAssemblies
Der Wert darf nicht NULL sein.
Parametername: path
CrmSvcUtil Runtime = 00:00:00.1430334
Relationship.xml
<?xml version="1.0" encoding="utf-8"?>
<EntityRelationships xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" />

Found out, that I used the wrong version. Use this to solve the issue:
https://learn.microsoft.com/en-nz/dynamics365/customerengagement/on-premises/developer/download-tools-nuget?view=op-9-1

Related

Is it possible to read property from portal-ext.properties using JavaScript or api/jsonws in Liferay 7.1?

I am defining the AMD module under OSGi module. I have to read host property in AMD loader definition. how can I read the property from portal-ext.properties file?
below is sample code how I am defining the AMD module and property in portal-ext.properties file.
portal-ext.properties
# host detail
host={{host_url}}
define AMD module
Liferay.Loader.define('genelec-shopping-cart', [], function(){
const host = ""; //here i have to read the property
return{
getHost:function(){
return host;
},
};
});
You can do this with ftl or jsp, building your JS with the value embedded.
Instead of creating the whole code from a JSP you can also just build a small portion of it, adding the value to a JS variable, making it available for scripts that will load later.
Let's say you have an OSGi module which JS code, you can create a .js.jsp that will build the JS before sending it.
Using JSP to create a small portion of JS:
<%# page contentType='application/javascript' %>
//here i have to read the property -> do it in java
Liferay.Loader.define('genelec-shopping-cart', [], function(){
const host = "${read_in_java}";
return{
getHost:function(){
return host;
},
};
});
You can include it from other JSP files as:
<c:url var='url' value='/variables.js.jsp'>
<c:param name='namespace' value='${namespace}'/>
</c:url>
<script src='${url}'></script>
But as you mentioned the host, you are probably looking for something much simpler than that (especially because this is kind of a hack), using Liferay's JS api:
Liferay.ThemeDisplay.getPortalURL() and friends, docs here:
https://dev.liferay.com/de/develop/tutorials/-/knowledge_base/7-1/liferay-javascript-apis

ReferenceError: ga is not defined [Ionic 2.2 Unit Testing With Karma]

I'm adding unit tests to an Ionic 2.2.0 app I manage, but my Components crash at test-time when they encounter Google Analytics code. I'm using Ionic's official unit testing example as a basis, and my current progress can be seen on our public repo.
My project uses Google Analytics, which is added to the HTML and downloaded at runtime (because we have different keys for development vs production).
The code that initializes Analytics is in my main.ts, and it sets a global variable ga, which is subsequently available throughout the application.
I'm beginning the tests for the app's first page, which uses Analytics. When I run the tests, I'm met with the following error
Component should be created FAILED
ReferenceError: ga is not defined
at new MyBusesComponent (webpack:///src/pages/my-buses/my-buses.component.ts:33:6 <- karma-test-shim.js:138419:9)
at new Wrapper_MyBusesComponent (/DynamicTestModule/MyBusesComponent/wrapper.ngfactory.js:7:18)
at CompiledTemplate.proxyViewClass.View_MyBusesComponent_Host0.createInternal (/DynamicTestModule/MyBusesComponent/host.ngfactory.js:15:32)
........
This is because main.ts doesn't seem to be loaded or executed, and I assume TestBed is doing that purposefully. It's certainly better that I don't have the actual Google Analytics object, but the Component does need a function called ga.
My question, therefore, is as follows: how can I create Google Analytics' ga variable in my test configuration such that it's passed through to my components at test-time?
I've tried exporting a function from my mocks file and adding it to either the imports or providers arrays in my spec file, but to no avail.
I appreciate any advice! Feel free to check my code at our repo I linked to above and ask any followups you need. Thanks!
You declare the var ga but that is just to make TypeScript happy. At runtime, the ga is made global from some external script. But this script is not included in the test.
What you could do is just add the (mock) function to the window for the tests. You could probably do this in your karma-test-shim.js.
window.ga = function() {}
Or if you wanted to test that the component is calling the function with the correct arguments, you could just add the function separately in each test that uses the function. For example
beforeEach(() => {
(<any>window).ga = jasmine.createSpy('ga');
});
afterEach(() => {
(<any>window).ga = undefined;
})
Then in your test
it('..', () => {
const fixture = TestBed.creatComponent(MyBusesComponent);
expect(window.ga.calls.allArgs()).toEqual([
['set', 'page', '/my-buses.html'],
['send', 'pageview']
]);
})
Since you're making multiple calls to ga in the constructor, the Spy.calls will get the argument of all each call and put them in separate arrays.

ember-cli / pod: Nesting resources/templates

I have read various stackoverflow threads and other forum entries, but I am not able to figure out how to get nested resources/templates working using ember-cli 0.1.12 and pod structure.
Versions:
Ember : 1.8.1 (also tried 1.9.1)
Ember Data : 1.0.0-beta.12
Handlebars : 1.3.0 (also tried 2.0.0)
jQuery : 1.11.2
My router.js (unchanged, cli created it, only demo purposes):
Router.map(function() {
this.resource("controls", function() {
this.route("statements");
this.resource("handles", function() {});
});
Situation:
No additional modifications besides ember generate commands and text markers in the created template.hbs
Resource "controls": template is displayed as expected
Route "controls/statements": template is displayed as expected
Resource "handles" under resource "controls" is not rendered at at all.
Subsequent routes unter "controls/handles" are also not working.
When I invoke http://localhost:4200/controls/handles, ember inspector only list "application" and "controls" in the view tree. In the ember inspector routes section, it lists: handles.index
HandlesIndexRoute Send to console
HandlesIndexController Send to console
handles/index
/controls/handles
I tried:
Switching ember and handlebar versions - no effect
Not using pod structure - no effect
Manually adding an index.hbs template in the handles pod folder - no effect
I have the feeling that I am missing a basic point here.
Could you please help me out?
Thank you,
Manuel
I can't help on the pod issue but can try on the other point.
What is the nature of your nested resource?
I would be expecting URLs like: "..controls/:control_id/handles".
I would have written this like this:
this.resource('controls', function() {
this.route('statements');
this.route('show', { path: ':control_id' }, function() {
this.resource('handles', function() {
});
});
});
Nick

Ember, JSON and IE8. Unable to display data

I am connecting to an API using a RESTAdapter. This seems to work well in IE9 and upwards. For some reason, when I'm trying to view the data in IE8, I get "Error while processing route: campaigns.index" and nothing else.
The software versions I'm using to create the Ember App is:
Ember : 1.8.1
Ember Data : 1.0.0-beta.8.2a68c63a
Handlebars : 1.3.0
jQuery : 1.10.2
I have tried changing the versions using bower so they are still compatible but I still get an error regarding the index with no explanation.
My route is:
TM.CampaignsIndexRoute = Ember.Route.extend({
model: function(){
return this.store.find("campaign")
}
});
My models attributes are being defined as:
TM.Campaign = DS.Model.extend({
campaign_name: DS.attr(),
campaign_code: DS.attr(),
desc: DS.attr(),
effective_from: DS.attr(),
products: DS.attr(),
type: DS.attr()
});
The JSON is setup as:
{
"campaigns":[
{
"id":"1",
"campaign_name":"Necessitatibus et.",
"campaign_code":"YQADM",
"desc":"1",
"effective_from":"2014-11-24 14:33:07",
"products":"Loans",
"type":"Gold"
},
{
"id":"2",
"campaign_name":"Voluptatem sequi adipisci necessitatibus.",
"campaign_code":"VFYGTO",
"desc":"1",
"effective_from":"2014-11-24 14:33:07",
"products":"Loans",
"type":"Gold"
}
],
"meta":{
"per_page":10,
"total":30
}
}
To get a better understanding of where it was failing with IE 8, I turned on LOG_TRANSITIONS_INTERNAL and it fails when attempting to call the afterModel hook
Attempting transition to campaigns
Transition #1: campaigns: calling beforeModel hook
Transition #1: campaigns: calling deserialize hook
Transition #1: campaigns: calling afterModel hook
Transition #1: campaigns.index: calling beforeModel hook
Transition #1: campaigns.index: calling deserialize hook
Error while processing route: campaigns.index
Transition #1: campaigns.index: transition was aborted
I don't receive any errors regarding Object.create because I'm using the shim to combat this and it seems to work fine.
I have considered reading about creating Ember qunit tests in order to get more information. Is this the right direction to look into or is there some configuration for IE 8 which I'm missing?
Unfortunately, I have to build this app to support IE8 and I'm enjoying using Ember so I'm hoping I can stick with it.
So I started again and stripped away every plugin I had. I'm using Laravel along with Ember to create my application. The Laravel Debug bar was preventing the model from appearing in IE8.
Thanks for your efforts Nicholas. Much appreciated.

Emberjs and Typescript SetUp

I'm having the hardest time getting typescript and ember to work together. I got all the definition files in definitely typed and I went through the ToDo walk throughs on Ember guide on the site. I'm trying to convert the js to typescript and see what the best way to go about setting up the project was, but I guess I'm not understanding the typescript definition very well.
If I do:
/// <reference path="typings/ember.d.ts" />
var App = Ember.Application.create();
App is a type of '{}' and I can't access 'Routers' to do the next line of the guide
App.Router.map( ... )
The best thing I found online was this which doesn't work with the current typing.
I've seen the typescript ember-app-kit but it doesn't really help since it barely includes any typescript and their setup is barely like the ember guides. I just need to be pointed in the right direction. Thanks guys.
I'm not familiar with Ember, but from inspecting ember.d.ts, I can see that create() is defined as a static generic function on object:
static create<T extends {}>(arguments?: {}): T;
So then you should be able to get better type information by passing an actual type:
var App = Ember.Application.create<Ember.Application>();
However, I see also that the ember typedef doesn't include a "Router" member in the application class, and even if it did, the Router class does not define map(). I was able to get it to work by creating an extended type definition:
// ./EmberExt.d.ts
/// <reference path="typedef/ember/ember.d.ts" />
declare class RouterExt extends Ember.Router {
map: ItemIndexEnumerableCallbackTarget;
}
declare class ApplicationExt extends Ember.Application {
Router: RouterExt;
}
And then referencing that from my combined router/application file:
/// <reference path="typedef/ember/ember.d.ts" />
/// <reference path="./EmberExt.d.ts" />
var App = Ember.Application.create<ApplicationExt>();
App.Router.map(function () {
this.resource('todos', { path: '/' });
});
After doing this, it compiles and loads without error, though it doesn't actually do anything (which I believe is ok for this phase of the walkthrough)
Full and mostly-accurate type definitions for Ember.js are now available to install from npm at #types/ember, #types/ember-data, and so on, currently all via the Definitely Typed project.
Ember CLI integration is available through the ember-cli-typescript addon. The easieset way to configure a Ember.js project with TypeScript is to run ember install ember-cli-typescript in the root of your Ember.js project. Doing so will automatically generate a tsconfig.json which handles Ember’s conventional project layout correctly (for apps, addons, and in-repo addons). It will also install the type definitions for all the core Ember projects automatically.