Closed Messaoudi-Nagib closed 2 years ago
Hi Messaoudi-Nagib, You can use the 'launch' method from the 'ApplicationService' service available in the framework to launch M3 programs, Bookmarks, and Mform Automation URL, it's equivalent to the Run command in M3. There is an example available in the sample app for the same for reference "https://github.com/infor-cloud/m3-h5-sdk/blob/master/m3-odin/src/app/soho-app/samples/launch/launch.component.ts"
Thank you @premkumarparames I've already seen this example, but my question is, how to get my tenant URL dynamically depending on wich environment I am :). Te reformulate : can I get the current tenant ID where the application is running, and then create a drillback URL based on the current tenant ID ?
You can get the current session info including the tenant id from the m3 context grid endpoint "/grid/user". I believe we don't need the tenant id in the bookmark url, do you mind sharing what is it you trying to do, for example, are you trying to open an M3 program from the h5 application with certain fields to be filled in automatically or you are trying to launch another Infor OS application.
Ok ! thank you very much, yes I'm trying to open an M3 program from H5 application (mashup) so basically what I've done is :
?LogicalId=lid://infor.m3.m3&program=OIS320&fieldNames=WWCUNO,,WWFACI,001,WWORNO,,WWPONR,,WWPOSX,,WWORTP,,WWNEPR,,WWCUCD,,WWWHLO,,WWPOPN,,WWITNO,,WWBANO,,WWORQA,,WWALUN,,WWPRDT,,WWSPUN,,WWSACD,&includeStartPanel=True&source=MForms&requirePanel=True&panel=B&tableName=OOI320&keys=OTCONO,600,OTCUNO,,OTITNO,,OTDWDT,+,OTQTLB,+,OTNETP,+,OTFVDT,+,OTDIPO,+,OTAGNO,+,OTAGLN,+,OTPRRF,+,OTPIDE,+¶meters=WWITNO,
window.open("https://mingle-portal.eu1.inforcloudsuite.com/XXX/" + (drillback_URL)
Do you think it is possible to open an M3 screen without the begining of the URL, if so, I would appreciate if you give me some advices.
Thank you, regards
@Messaoudi-Nagib Your H5 application is already running within the M3 context, so you don't need the M3 URL or the mingle URL to launch an M3 program or the bookmark. You can pass the program name in the lanch method or the bookmark with the prefix "bookmark?" or the mform automation XML string with the prefix "mforms://_automation?data=
For example,
this.applicationService.launch("mforms://_automation?data=<?xml+version='1.0'+encoding='utf-8'?>
Hope this helps.
This is exactly what I want ! thank you so much for the answer !
Regards !
Description
Hi, I have to make a button that leads to infor M3 screen, I'm using drillback URL to do it, but depending on wich environment I work, I would like to get the right tenant URL.
Is that a way to do it ? (API, or other method ?)
Thank you, regards
Versions
Infor M3 cloud