Meta tags:
Headings (most frequently used words):
in, step, 2024, monday, december, dynamics, with, external, data, 2025, conversion, the, 30, to, d365fo, services, class, browser, tables, adventures, axapta, world, enhancing, 365, finance, and, operations, real, time, thursday, june, 11, 2026, july, may, 12, use, case, currency, sales, order, form, prerequisites, implementation, guide, advantages, of, this, approach, final, thoughts, tuesday, 24, saturday, 21, friday, august, about, archive, microsoft, 365fo, ax, resources, followers, subscribe, custom, entities, not, visible, ude, after, deployment, packing, sets, maps, lists, etc, why, con2str, can, break, your, code, consuming, web, storing, connection, information, api, response, wzhexchangerateresponsedc, main, logic, wzhexchangerateservice, fetch, rate, handling, errors, running, service, getting, ondelete, value, for, table, metadata, metada, find, all, relations, given, field, dual, write, setup, from, lifecycle, fails, at, application,
Text of the page (most frequently used words):
the (87), wzhrelatedtablestmp (43), and (39), dicttable (39), for (30), table (28), dictrelation (27), tableid (27), #service (23), relation (22), tables (22), wzhfieldstmp (22), int (21), system (21), wzhtablestmp (21), api (21), public (20), this (19), web (19), class (18), fieldid (16), rate (16), new (15), may (14), january (14), data (14), name (14), dict (14), dictfield (14), all (13), october (13), with (13), from (13), conversion (13), salesline (13), july (12), december (12), june (12), d365fo (12), can (12), application (12), step (12), relationline (12), february (11), march (11), april (11), august (11), str (11), return (11), currency (11), webservice (11), void (10), relations (10), method (10), external (10), real (10), url (10), response (10), comments (9), dynamics (9), you (9), strfmt (9), _tableid (9), mtdmodel (9), error (9), request (9), create (9), september (8), not (8), wojzeh (8), your (8), static (8), loop (8), through (8), dictionary (8), form (8), wzhexchangerateservice (8), container (8), set (8), november (7), labels (7), posted (7), info (7), code (7), like (7), label (7), collections (7), sales (7), resp (7), custom (6), services (6), main (6), relname (6), linescnt (6), _fieldid (6), check (6), numoftables (6), research (6), ret (6), constraintfield (6), using (6), net (6), connection (6), price (6), usd (6), wzhexchangerateresponsedc (6), these (6), webapp (6), 2024 (5), after (5), values (5), get (5), relcount (5), are (5), given (5), field (5), fields (5), wzhtabletools (5), populaterelatedtables (5), element (5), that (5), metadata (5), while (5), securely (5), emwebservice (5), emwebapplication (5), records (5), order (5), key (5), currencycode (5), rates (5), use (5), result (5), into (5), str2con (5), posts (4), ude (4), sql (4), database (4), following (4), need (4), one (4), parameter (4), fieldid2name (4), relationfound (4), tableobject (4), find (4), metada (4), populatetables (4), populatefields (4), clear (4), issql (4), insert (4), type (4), relatedtablename (4), role (4), relatedtablerole (4), relatedtablecardinality (4), cardinality (4), relationshiptype (4), ondelete (4), add (4), browser (4), ienumerable (4), enumrelations (4), enumconstraints (4), constraint (4), current (4), list (4), functionality (4), time (4), instead (4), button (4), run (4), getconversionrate (4), parameters (4), summary (4), construct (4), _salesline (4), currencyto (4), param (4), _currencyfrom (4), _currencyto (4), httpheader (4), apikey (4), netexcepn (4), where (4), throw (4), methods (4), atom (3), microsoft (3), 2025 (3), entities (3), visible (3), dual (3), write (3), issue (3), related (3), suppitemgroup (3), groupid (3), suppitemgroupid (3), final (3), _args (3), internal (3), example (3), break (3), isview (3), istmp (3), istempdb (3), ismap (3), isdataentity (3), isabstract (3), tablecnt (3), tablecnt2id (3), manually (3), based (3), some (3), which (3), delete_from (3), wzhrelatedtablestmp_ds (3), settmpdata (3), super (3), issystem (3), relatedfieldname (3), other (3), entity (3), simple (3), their (3), etc (3), article (3), ienumerator (3), axtablerelationconstraintfield (3), enumtables (3), getenumerator (3), movenext (3), monday (3), storing (3), approach (3), information (3), manage (3), conversions (3), currencyfrom (3), between (3), currencies (3), base (3), reader (3), responsedata (3), object (3), conversionrate (3), string (3), msg (3), errmsg (3), select (3), recid (3), retrieve (3), success (3), parmresult (3), here (3), sets (3), structure (3), store (3), regulatory (3), convert (3), via (3), will (3), 365 (3), finance (3), operations (3), pack (3), con2str (3), function (3), subscribe (2), 2020 (2), 2026 (2), true (2), default (2), receive (2), environment (2), just (2), standard (2), searching (2), purchinventsuppitemgroupid (2), search (2), completed (2), args (2), tableid2name (2), getrelatedtables (2), findalltableswithrelations (2), specific (2), types (2), tablename (2), relationcnt (2), loadnamerelation (2), externtable (2), lines (2), lineexterntablevalue (2), linetablevalue (2), amdevicetable (2), deviceid (2), false (2), was (2), able (2), working (2), attributes (2), saved (2), logic (2), wzhfieldstmp_ds (2), clearfields (2), clearrelatedtables (2), active (2), datasource (2), pname (2), numoffields (2), typeid (2), relatedtablepname (2), relationname (2), isedtrelation (2), edtrelation (2), cannot (2), how (2), constraints (2), axtablerelation (2), axtablerelationconstraint (2), axtable (2), fieldname (2), mtdsupport (2), free (2), consuming (2), leverage (2), sources (2), existing (2), enhance (2), security (2), integrate (2), multiple (2), endpoints (2), under (2), changes (2), update (2), record (2), retrieves (2), settings (2), converted (2), line (2), show (2), handling (2), issues (2), any (2), errors (2), contract (2), http (2), dynamically (2), azure (2), vault (2), parmsalesline (2), fetches (2), two (2), const (2), appname (2), wzhexchangerateapi (2), serviceid (2), wzhcurrencypairconversion (2), streamreader (2), webheadercollection (2), exception (2), firstonly (2), found (2), json (2), parse (2), parmrate (2), failed (2), details (2), named (2), contains (2), display (2), used (2), datamember (2), _result (2), _rate (2), stores (2), same (2), provides (2), implementation (2), access (2), publicly (2), available (2), exchangerate (2), they (2), configurations (2), exchange (2), global (2), reconstruction (2), maps (2), what (2), when (2), dmfentity (2), entityname (2), targetentity (2), yourcustomtableentity (2), have (2), refreshing (2), mappings (2), added (2), installed (2), version (2), adventures (2), axapta (2), world (2), skip (2), followers, training, axforum, russian, developer, jobs, 365fo, resources, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017, 2018, 2019, 2021, 2022, 2023, depl, archive, view, complete, profile, supporting, production, montréal, québec, canada, about, home, older, lcs, now, resume, process, open, switch, flip, keep, applying, change, procedure, setup, lifecycle, fails, friday, custtable, retailmassupdateworksheetline, purch_suppitemgroupid, vendtable, suppitemtable, accountcode, inventtablemodule, aminventitemtemplatestaging, aminventitemtemplate, output, tablenum, fieldnum, replace, own, uncomment, enough, number, continue, boolean, unfortunately, none, generative, tools, tried, provide, wrote, articles, doc, sometimes, know, saturday, splitter, filtering, lets, rapidly, required, subset, three, temporary, implemented, extends, formrun, wzhtablestmp_ds, init, wzhtables, issystemtable, fieldcnt, fieldcnt2id, fieldobject, basetype, edt, extendedtypeid2name, isvisible, ismandatory, mandatory, isallowedit, allowedit, isalloweditoncreate, alloweditoncreate, edtpname, extendedtypeid2pname, challenge, still, action, easily, elaborate, solution, exposed, inmemory, forget, each, grid, exported, excel, has, old, good, horizontal, vertical, splitters, facilitate, browsing, browse, previous, tuesday, getalltables, gettablerelations, relatedtable, relatedfield, tablename2id, fieldname2id, syslabel, labelid2string, ondeleteaction, tostring, thanks, martin, drab, refactored, metamodel, goshoom, dev, blog, getting, value, webservices, msdyn365community, integration, exchangerates, dynamics365, azureintegration, feel, customize, extend, its, according, project, requirements, happy, axing, allows, third, party, maintainability, structured, enables, developers, efficiently, thoughts, holds, single, efficient, management, only, flexible, directly, dynamic, construction, uses, hardcoding, urls, configuration, driven, advantages, prints, calculates, accounting, feature, executed, clicking, running, includes, robust, connectivity, invalid, responses, captured, detailed, messages, displayed, user, parses, sends, reads, constructs, input, ideally, finds, core, lies, follows, steps, fetch, consumes, private, ledger, accountingcurrency, salesprice, target, eur, constants, separate, httpwebrequest, httpwebresponse, jsoncontainer, jsonobject, netstring, try, webapplication, webserviceid, encrypted, getdigitalcertificate, getprivatekey, keyvaultcertificatehelper, getmanualsecretvalue, keyvaultcertificateref, 111914749114a4117ca989d2, test, sake, baseurl, webrequest, requestmethod, contenttype, requestcontenttype, authorization, bearer, set_headers, getresponse, getresponsestream, readtoend, bearing, formjsonserializer, deserializeobject, classnum, successfulresponsecode, normally, meant, 200, additionalsuccessfulresponsecodes, but, else, catch, clrerror, clrinterop, getlastexception, something, goes, wrong, call, let, grab, innerexception, message, initialize, designed, triggered, click, initializes, wzhexchangerateserviceconvert, datacontract, conversion_rate, different, pair, latest, such, general, understanding, within, module, connections, allow, guide, authentication, site, development, prerequisites, although, part, electronic, messaging, mainly, intended, reporting, also, conveniently, utilized, pro, tip, additionally, keys, promotes, reuse, simplifies, maintenance, prices, both, infolog, labeled, assume, company, our, aim, build, chosen, well, many, case, integrating, greatly, allowing, various, demonstrate, consume, practical, retrieving, enhancing, map, functions, preserve, without, implicit, safely, deserialize, base64str2con, serialize, con2base64str, avoid, altogether, restore, containers, smooth, ran, root, cause, interprets, numeric, long, integers, silent, coercion, corrupted, expected, led, failure, int64, everything, worked, fine, until, restored, back, pass, argument, depicted, had, logical, flow, happened, seemed, routine, task, encountered, unexpected, passing, specified, cast, valid, packing, lists, why, fix, command, dbo, similar, connect, names, once, appeared, generate, see, des, even, them, were, generated, turned, out, been, references, actual, text, english, seems, culprit, experienced, problem, explained, https, community, com, forums, thread, threadid, 1b8af6ce, 8502, f111, 8406, 7c1e525b1dbf, deployment, thursday, release, wave, product, 605, 20015, platform, update38, 5778, 41504, sidebar,
Text of the page (random words):
urrencycode currencyfrom salesline currencycode currencycode currencyto ledger accountingcurrency real rate this getconversionrate currencyfrom currencyto info strfmt conversion rate from 1 to 2 3 currencyfrom currencyto rate info strfmt price in 1 is 2 currencyto salesline salesprice rate summary fetches the conversion rate between two given currencies summary param name _currencyfrom base currency code e g usd param param name _currencyto target currency code e g eur param public real getconversionrate currencycode _currencyfrom currencycode _currencyto these constants can be saved in a separate parameters table const str appname wzhexchangerateapi const str serviceid wzhcurrencypairconversion system net httpwebrequest request system net httpwebresponse response system io streamreader reader system net webheadercollection httpheader str responsedata url apikey emwebapplication webapp emwebservice webservice container jsoncontainer object jsonobject real conversionrate system string netstring system exception netexcepn str msg str errmsg wzhexchangerateresponsedc resp try step 1 find the web application and web service records select firstonly webapp where webapp name appname if webapp recid throw error web application for currency conversions not found select firstonly webservice where webservice webapplication webapp recid webservice webserviceid serviceid if webservice recid throw error web service for currency conversion rates not found step 2 retrieve the api key securely from azure key vault or encrypted table check other methods getdigitalcertificate getprivatekey apikey keyvaultcertificatehelper getmanualsecretvalue webservice keyvaultcertificateref false apikey 111914749114a4117ca989d2 for the test s sake step 3 construct the api url dynamically url strfmt 1 2 3 4 webapp baseurl webservice url _currencyfrom _currencyto step 4 create the http request request system net webrequest create url request method webservice requestmethod get request contenttype webservice requestcontenttype application json httpheader new system net webheadercollection httpheader add authorization bearer apikey security info request set_headers httpheader step 5 get the response response request getresponse reader new system io streamreader response getresponsestream responsedata reader readtoend step 6 parse the json response to a custom data contract bearing success code and rate resp formjsonserializer deserializeobject classnum wzhexchangerateresponsedc responsedata if resp resp parmresult webservice successfulresponsecode this table success code is int and normally meant to be 200 if resp resp parmresult webservice additionalsuccessfulresponsecodes but here we use this parameter as success conversionrate resp parmrate else throw error error failed to parse the conversion rate catch exception clrerror netexcepn clrinterop getlastexception if netexcepn something goes wrong with the service call let s grab all details errmsg strfmt error 1 netexcepn innerexception message msg strfmt failed to retrieve conversion rate 1 2 n 3 _currencyfrom _currencyto errmsg throw error strfmt error 1 msg return conversionrate step 4 fetch conversion rate the core functionality lies in the getconversionrate method it follows these steps finds the web application and service records using emwebapplication and emwebservice tables retrieves the api key securely ideally using azure key vault constructs the url dynamically based on input parameters sends an http request to the api and reads the response parses the response using a custom data contract wzhexchangerateresponsedc ️ handling errors the getconversionrate method includes robust error handling to manage connectivity issues or invalid api responses any errors are captured and detailed messages are displayed to the user ️ running the service the run method prints the conversion rate and calculates the converted price based on the current sales line s currency and the accounting currency this feature can be executed by clicking the show price in usd button on the sales order form advantages of this approach configuration driven uses web application and web service records instead of hardcoding urls dynamic url construction retrieves settings directly from the d365fo database flexible if the api url changes you only need to update the web application record efficient management the web application table holds the main connection information while the web service table can manage multiple api endpoints under a single application final thoughts consuming external web services in x allows d365fo to leverage real time data from third party sources by using d365fo s existing emwebapplication and emwebservice tables for storing connection data we can enhance security and maintainability following this structured approach enables developers to integrate external services efficiently and securely feel free to customize the class and extend its functionality according to your project requirements happy axing posted by wojzeh at 9 47 pm no comments labels azureintegration d365fo dynamics365 exchangerates integration msdyn365community webservices monday december 30 2024 getting ondelete value for table metadata browser thanks to martin drab s article new metadata api goshoom net dev blog i refactored one method of my table metadata browser by using microsoft dynamics ax metadata metamodel api to loop through the list of table relations public static wzhrelatedtablestmp populaterelatedtables tableid _tableid fieldid _fieldid wzhrelatedtablestmp wzhrelatedtablestmp system collections ienumerable relations system collections ienumerator enumrelations system collections ienumerable constraints system collections ienumerator enumconstraints mtdmodel axtablerelation relation mtdmodel axtablerelationconstraint constraint mtdmodel axtablerelationconstraintfield constraintfield mtdmodel axtable table tablename relatedtablename tableid2name _tableid fieldname relatedfieldname fieldid2name _tableid _fieldid system collections ienumerable tables mtdsupport getalltables system collections ienumerator enumtables tables getenumerator loop through all tables in the system while enumtables movenext table enumtables current as mtdmodel axtable relations mtdsupport gettablerelations table name as system collections ienumerable enumrelations relations getenumerator while enumrelations movenext relation enumrelations current as mtdmodel axtablerelation if relation relation relatedtable relatedtablename enumconstraints relation constraints getenumerator while enumconstraints movenext constraint enumconstraints current as mtdmodel axtablerelationconstraint if constraint is mtdmodel axtablerelationconstraintfield constraintfield constraint as mtdmodel axtablerelationconstraintfield check if the relation is with a given table if constraintfield constraintfield relatedfield relatedfieldname wzhrelatedtablestmp clear wzhrelatedtablestmp id tablename2id table name wzhrelatedtablestmp fieldname constraintfield field wzhrelatedtablestmp fieldid fieldname2id wzhrelatedtablestmp id constraintfield field wzhrelatedtablestmp relatedtablename table name wzhrelatedtablestmp label table label wzhrelatedtablestmp relatedtablepname syslabel labelid2string table label wzhrelatedtablestmp relationname relation name wzhrelatedtablestmp role relation role wzhrelatedtablestmp relatedtablerole relation relatedtablerole wzhrelatedtablestmp relatedtablecardinality relation relatedtablecardinality wzhrelatedtablestmp isedtrelation relation edtrelation wzhrelatedtablestmp cardinality relation cardinality wzhrelatedtablestmp relationshiptype relation relationshiptype wzhrelatedtablestmp ondeleteaction relation ondelete tostring wzhrelatedtablestmp insert return wzhrelatedtablestmp posted by wojzeh at 11 08 am no comments labels api browser metadata ondelete relation table tuesday december 24 2024 tables metada browser following my previous article i add a simple form to browse tables metada like fields relations their attributes etc it has the old good horizontal and vertical splitters to facilitate your browsing filtering by attributes like system or data entity lets rapidly find required subset of tables and fields do not forget that each grid can be exported to excel all data are saved in three inmemory temporary tables and all the logic is implemented in one class wzhtabletools so you can easily elaborate this solution if some other metada need to be exposed challenge i still cannot find how to get ondelete action type for a relation class internal final class wzhtabletools public static wzhtablestmp populatetables dictionary dict new dictionary int numoftables dict tablecnt dicttable dicttable tableid tableid int j wzhtablestmp wzhtablestmp loop through all tables in the system for j 1 j numoftables j tableid dict tablecnt2id j dicttable dict tableobject tableid wzhtablestmp clear wzhtablestmp id tableid wzhtablestmp name dicttable name wzhtablestmp istmp dicttable istmp wzhtablestmp isview dicttable isview wzhtablestmp pname dicttable label wzhtablestmp isabstract dicttable isabstract wzhtablestmp isdataentity dicttable isdataentity wzhtablestmp ismap dicttable ismap wzhtablestmp istempdb dicttable istempdb wzhtablestmp issystem dicttable issystemtable wzhtablestmp issql dicttable issql wzhtablestmp insert return wzhtablestmp public static wzhfieldstmp populatefields tableid _tableid dictionary dict new dictionary dicttable dicttable dict tableobject _tableid int numoffields dicttable fieldcnt int j fieldid fieldid dictfield dictfield wzhfieldstmp wzhfieldstmp loop through all fields in the table for j 1 j numoffields j fieldid dicttable fieldcnt2id j dictfield dicttable fieldobject fieldid wzhfieldstmp clear wzhfieldstmp id fieldid wzhfieldstmp name dictfield name wzhfieldstmp type dictfield basetype wzhfieldstmp edt extendedtypeid2name dictfield typeid wzhfieldstmp isvisible dictfield visible wzhfieldstmp ismandatory dictfield mandatory wzhfieldstmp isallowedit dictfield allowedit wzhfieldstmp isalloweditoncreate dictfield alloweditoncreate wzhfieldstmp edtpname extendedtypeid2pname dictfield typeid wzhfieldstmp pname dictfield label wzhfieldstmp issystem dictfield issystem wzhfieldstmp issql dictfield issql wzhfieldstmp insert return wzhfieldstmp public static wzhrelatedtablestmp populaterelatedtables tableid _tableid fieldid _fieldid dictionary dict new dictionary int numoftables dict tablecnt dicttable dicttable dictrelation dictrelation tableid tableid int i j int linescnt int relationline int c str relname wzhrelatedtablestmp wzhrelatedtablestmp loop through all tables in the system for j 1 j numoftables j tableid dict tablecnt2id j dicttable dict tableobject tableid dictrelation new dictrelation tableid loop through all table relations int relcount dicttable relationcnt for i 1 i relcount i relname dicttable relation i dictrelation loadnamerelation relname if dictrelation dictrelation externtable _tableid linescnt dictrelation lines for relationline 1 relationline linescnt relationline check if the relation is with amdevicetable deviceid if dictrelation lineexterntablevalue relationline _fieldid c wzhrelatedtablestmp clear wzhrelatedtablestmp id c wzhrelatedtablestmp fieldid dictrelation linetablevalue relationline wzhrelatedtablestmp relatedtablename dicttable name wzhrelatedtablestmp relatedtablepname dicttable label wzhrelatedtablestmp relationname relname wzhrelatedtablestmp role dictrelation role wzhrelatedtablestmp relatedtablerole dictrelation relatedtablerole wzhrelatedtablestmp relatedtablecardinality dictrelation relatedtablecardinality wzhrelatedtablestmp isedtrelation dictrelation edtrelation wzhrelatedtablestmp cardinality dictrelation cardinality wzhrelatedtablestmp relationshiptype dictrelation relationshiptype wzhrelatedtablestmp relatedfieldname fieldid2name tableid wzhrelatedtablestmp fieldid wzhrelatedtablestmp insert return wzhrelatedtablestmp form form public class wzhtables extends formrun public void clearfields delete_from wzhfieldstmp delete_from wzhrelatedtablestmp wzhfieldstmp_ds research wzhrelatedtablestmp_ds research public void clearrelatedtables delete_from wzhrelatedtablestmp wzhrelatedtablestmp_ds research public void populatetables wzhtablestmp settmpdata wzhtabletools populatetables wzhtablestmp_ds research public void populatefields wzhfieldstmp settmpdata wzhtabletools populatefields wzhtablestmp id wzhfieldstmp_ds research public void populaterelatedtables wzhrelatedtablestmp settmpdata wzhtabletools populaterelatedtables wzhtablestmp id wzhfieldstmp id wzhrelatedtablestmp_ds research datasource class wzhtablestmp public int active int ret ret super element clearfields element populatefields return ret public void init super element populatetables datasource class wzhfieldstmp public int active int ret ret super element clearrelatedtables element populaterelatedtables return ret posted by wojzeh at 3 00 pm no comments labels fields form metada relations splitter tables saturday december 21 2024 find all tables with relations to a given field sometimes we need to know which tables are related to a given table on a given field unfortunately none of ai generative tools i tried was able to provide me with a working code so i wrote this code manually based on microsoft doc and some articles static void findalltableswithrelations tableid _tableid fieldid _fieldid dictionary dict new dictionary dicttable dicttable dictrelation dictrelation tableid tableid int i j int linescnt int relationline int c int numoftables dict tablecnt boolean relationfound loop through all tables in the system for j 1 j numoftables j relationfound false tableid dict tablecnt2id j dicttable dict tableobject tableid uncomment the following to get specific table types if dicttable isabstract dicttable isdataentity dicttable ismap dicttable istempdb dicttable istmp dicttable isview continue dictrelation new dictrelation tableid str tablename dicttable name loop through all table relations int relcount dicttable relationcnt info strfmt number of relations 1 relcount for i 1 i relcount i str relname dicttable relation i dictrelation loadnamerelation relname if dictrelation dictrelation externtable _tableid linescnt dictrelation lines for relationline 1 relationline linescnt relationline check if the relation is with amdevicetable deviceid if dictrelation lineexterntablevalue relationline _fieldid c info strfmt 1 2 3 c dicttable name fieldid2name tableid dictrelation linetablevalue relationline relationfound true break just one relation is enough if relationfound break you can replace tableid and fieldid with your own values for example for groupid table internal final class getrelatedtables public static void main args _args tableid tableid tablenum suppitemgroup fieldid fieldid fieldnum suppitemgroup groupid info strfmt searching related tables for 1 2 tableid2name tableid fieldid2name tableid fieldid getrelatedtables findalltableswit...
|