Skip to main content

Notifications

Announcements

No record found.

Dynamics 365 Community / Forums / Finance forum / If condition for combobox
Finance forum
Suggested answer

If condition for combobox

Posted on by 125
Can you pls help me out?
 
xtsvendorselect is the parameter,
xtsvendorselect enum has two values as transaction and item with if condition we want that if transaaction i selected vendor will come from custinvoicetrans and if item is selected it wil pick up vendor from vendtable and if transaction is selected then vendor is pickup from custinvoicetrans in x++
 
i have added this parameter in contract class
 
XTSvendor selection is base enum having two values trans and item.
and xtsvendorselect is edt enum having extend property as xtsvendorslection
 
  • M_R Profile Picture
    M_R 125 on at
    If condition for combobox
    Actually, item and transaction is filter for the report
    we just want vendor from item master for item, and for transaction it should be from custinvoicetrans
  • Suggested answer
    Bharani Preetham Peraka Profile Picture
    Bharani Preetham Pe... 3,528 Super User on at
    If condition for combobox
    At line 200, findCustInvoiceTrans has total 5 arguments. But you are passing "itemId" which seems you have not given complete information to us about the value you are passing. And the method is actually expecting different arguments.
     
    For line 198, you did not provide us the full information about the contract parm method you have defined. I understood that it is a parameter but I assume the contract parm method is having an issue.
     
    So, can you please correct the things as suggested and give us full detail?
  • Suggested answer
    GirishS Profile Picture
    GirishS 27,828 Super User on at
    If condition for combobox
    Hi M_R,
     
    I think you need to write a separate query to fetch data from different tables based on the selected Enum value.
    But I can't understand why you are picking the vendor from CustInvoiceTrans table, in fact CustInvoiceTrans table doesn't have Vendor field it seems.
    You told the Enum as parameter, but you didn't mention where you have added this as parameter which is about like form or class or something else?
    Can you elaborate?
     
    Thanks,
    Girish S.

Helpful resources

Quick Links

Replay now available! Dynamics 365 Community Call (CRM Edition)

Catch up on the first D365 Community Call held on 7/10

Community Spotlight of the Month

Kudos to Saurav Dhyani!

Congratulations to the June Top 10 community leaders!

These stars go above and beyond . . .

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 288,768 Super User

#2
Martin Dráb Profile Picture

Martin Dráb 225,985 Super User

#3
nmaenpaa Profile Picture

nmaenpaa 101,148

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans