Not show Business Component values in Gx17U9 - genexus

On Gx17 U9 I have the following problem. I am generating JAVA Web and the webpanel is
Web User Experience = Previous versions compatible
To make
Event Enter
&transactionBC.Load(&Varible)
EndEvent
On screen the BC elements do not load any value, this was working in previous Gx upgrades
Any solution?

Related

Receive notification back from Xamarin Forms Maps

I have a Xamarin Forms app that, during it's execution, launches the Maps plugin (from the Essentials package). Here's the code that I use to launch the maps:
var location = new Location(latitude, longitude);
var options = new MapLaunchOptions
{
NavigationMode = NavigationMode.Driving
};
await Map.OpenAsync(location, options);
However, since I want the user to be directed to a location, I want to know when they get there; the idea being that some events occur within the app when the user arrives.
It looks, to me, like the Maps plug-in doesn't provide any kind of notification.
I've been through a few iterations of this. Initially, I thought of using the Geolocator to identify when the user arrives, then had a look at a Geofencing plug-in that I found.
Before I head down either of these rabbit holes: is it possible to get the Maps plug-in to tell me when the user arrives at a location.
It is possible by Creating the Custom Map to realize it in each platform.
You can create a Timer Task in Background service to execute getting current location from Geolocator (not a plugin).Then when current location is detination , message can be passed to where you want to do.
By the way , about native framework in each platform . There are some methods like UpdateLocation can be directly used to know the current location .
Such as :
IOS has startUpdatingLocation method to listen the current location.
Android has onLocationChanged method to know the current location if changed.
What need to do is to notification the user he has arrived the detination when the current position enters the range .

Need to tell users when update occurs

I want to notify all the app users to update the app (through a popup in the app itself) whenever there is a new version deployed in the stores. Can someone suggest the best way to do that?
Luckily, we do have solution for iOS app store
string url = "http://itunes.apple.com/lookup?bundleId=com.xxx.xxxxx";
HttpClient httpClient = new HttpClient();
Task<string> jsonString = httpClient.GetStringAsync(string.Format(
var lookup = JsonConvert.DeserializeObject<Dictionary<string, object>>(jsonString.Result);
But Now I need to get the current version of App from Google Play Store?
Let's say you want to notify the users about a new version of the app every time they open the application, then you should just trigger a simple GET call to retrieve the latest version info or use a third party lib to act accordingly.
0 cost simple solutions
One option would be to ask the API (if there is any) if a new version is available - basically delegate the problem to someone else. If there is no backend the app could do the check itself. There are different options from having a simple txt file hosted somewhere with the latest app version to scraping App Store and Play Store for the current published version of the app.
Existing solutions
https://appgrades.io/
https://github.com/ArtSabintsev/Siren
Use Push Notifications to notify your users
You will find more if you google it
Platform specific solutions
For iStuff (Apple) you could use iTunes Search API as mentioned here
Other platforms may have their own APIs
Depends on the specific case you can decide what will work better for you.
P.S.: Be sure to handle the versioning correctly by bumping the app version on each release.

NHibernate + ASP.NET Identity + Autofac cache issue

I'm building a profile page with update form. After submitting the form with new data and several page refreshes I see sometime new and sometimes old data. It depends on thread handling current request. One thread contains new data and another one old. NHibernate is configured using ThreadStaticSessionContext and NoCacheProvider. In Autofac UserStore, OwinContext.Authentication and UserManager are configured as InstancePerRequest.
I tried to change ThreadStaticSessionContext to CallSessionContext and it started working normally. So the question is: why it works(ThreadStaticSessionContext is preferable for multithread apps) and what negative effects can it bring?
Thanks!
ThreadStaticSessionContext is for long running processes such as windows services or windows apps. For web applications you want to be implementing Session Per Request. This is what the WebSessionContext is for.
I actually don't use any of the contexts and just wire it up myself. See my answer here for an example.

Click-To-Call feature for Dynamics CRM (like Lync/Skype)

Advance warning: Im an absolute newbie to Dynamics CRM!
Intention
I want to have a feature like Lync/Skype integration but use my own URL. (Click on any telephone number inside CRM and call it).
For eg. assuming I have a web service which can initiate a call per URL: http://telephony.com/call?nr=012345678. Now, whenever a CRM user clicks onto a telephone number field (in forms and views) inside the CRM my web service should be called instead of Skype/Lync.
In fact I'm trying to reproduce sth. like the InGenius Connecter.
Attempts
I already tried to inject a JS web resource to a specific formular (in my case it was the default contact form) and override the Mscrm.ReadFormUtilities.openPhoneClient callback (which seems to handle the Lync/Skype integration).
function load() {
// override integrated CTC (Lync/Skype)
Mscrm.ReadFormUtilities.openPhoneClient = function (telephoneNr) {
// redirect user to my web service
window.location.replace("http://telephony.com/call?nr="+telephoneNr);
return;
}
}
Found this method at: Disable Lync completely
This does work well in forms of Dynamics 2015 (my custom link pops up instead of Skype/Lync). However, this does only work on entity forms since I can't inject web resources into an entity view.
My other ideas how to implement such a feature are:
Inject global JS resource which disables Lync/Skype and encapsulate every telephone number with link to my custom URL.
Extend/Manipulate Lync/Skype integration to use my custom URL instead of Lync/Skype.
Write plugin which encapsulate telephone numbers server side.
Question
Since I have a grasp understanding of Dynamics and no experience in plugin/resource development, I'm left a bit confused with these questions.
Is it possible to achieve any of the three ideas above ?
If not, any idea how InGenius solved this problem ?
Do you have any other idea/resources about this topic ?
Currently I found two options available to achieve a custom CTC feature. (Both has the downside of not being officialy supported by the dynamics crm.)
Global Ribbon
Pretty simple: Add a Click-To-Call button to global ribbon which is only enabled on specific grids when one row is selected.
This button refers to an JS-Action which retrieves the telephone number via ODATA and then launches the dial process.
Global Ribbon CustomRule injection
Add a global button to ribbon which refers to a JS resource per <CustomRule>. The JScript then unbinds all actions from links with .ms-crm-Phone classes and replaces its href-attribute.
This would be useful if one want to override the integrated "Skype / Lync - Click to Dial" feature with his own logic.
I didn't test this method until now, so I can't guarentee it's working !
Note: I will include example scripts as soon I got the time.

Microsoft Dynamics CRM 4 custom entity form onload event not firing

We have a problem with the onload event of the form for a custom entity not firing. The form did work correctly for a period but recently has stopped working. Now none of the code in the event is executed when the form is opened - either when creating a new instance of the entity or when opening an existing one. The code does however get executed when the form is previewed.
For testing purposes the original code has been removed and the onload event currently only has the following:
crmForm.all.ownerid_c.style.display = 'none';
crmForm.all.ownerid_d.style.display = 'none';
alert("OnLoad event fired");
In preview the Owner attribute is hidden and the alert is shown. When running the form normally the attribute is not hidden and there is no alert (there are also no Java errors reported).
The full CRM version is 4.0.7333.1219. The entity was originally created on a different CRM installation which was initially version 3. That environment was upgraded to version 4 before we did the export – import process for migrating it to the current environment. The form worked correctly for a period of time on the new environment but at some stage stopped doing so.
I enabled platform tracing using Microsoft Crm Diagnostics Tool 4 and now the onload event is executed. It still works when tracing is disabled again.
God I love developing in this environment.

Resources