Quantcast
Channel: Microsoft Dynamics AX
Viewing all articles
Browse latest Browse all 101540

Forum Post: smmBusRelTable AIF Inbound

$
0
0
Hi All, I'm trying to create a record in smmBusRelTable through AIF by calling existing AX code that's in place. Please note, the AxdBusinessRelation query has a join with DirPartyTable table. This is the query that's used by smmBusRelService . Below is a portion of my code since it's not 100% complete. If I use the .createDirParty().addNew() as shown in red below, AIF creates the record AND it creates a new entry in DirPartyTable called 'abc'. This makes perfect sense. However, I want to tell AIF to create a record in smmBusRelTable but not in DirPartyTable. Meaning, I want to reference an existing party that's already in DirPartyTable when I create a new record in smmBusRelTable. I also tried setting smmBusRelTable.parmParty('12345xxxxx') but AIF tells me invalid party number even though the number exists in the DirPartyTable. I may be missing really small or I may be way off :) smmBusRelService svc; AifEntityKeyList aifEntityKeyList; smmBusRel smmBusRelObj; smmBusRel_smmBusRelTable smmBusRelTable; smmBusRel_DirParty dirPartyTable; ; smmBusRelObj = new smmBusRel(); svc = smmBusRelService::construct(); smmBusRelObj.createsmmBusRelTable(); smmBusRelTable = smmBusRelObj.parmsmmBusRelTable().addNew(); // This works but it creates a record in DirPartyTable for 'abc' each time (not good) dirPartyTable = smmBusRelTable.createDirParty().addNew(); dirPartyTable.parmName('abc'); smmBusRelTable.parmCurrency('USD'); smmBusRelTable.parmBusRelTypeId('Prospect'); smmBusRelTable.parmMainContactWorker('000003'); aifEntityKeyList = svc.create(smmBusRelObj); Any guidance / help would be appreciated! Thanks! Bobby Pejman

Viewing all articles
Browse latest Browse all 101540

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>