Quantcast
Channel: Microsoft Dynamics AX Forum - Recent Threads
Viewing all articles
Browse latest Browse all 73760

How to update customer details in Ax by using AIF in C#

$
0
0

 

Hai friends,

I need how to update Customer details by using AIF services.

 

 

 

using System;

using System.Collections.Generic;

using System.Linq;

using System.Text;

using System.Collections;

 

namespace UpdateCustInfo

{

    class Program

    {

        static void Main(string[] args)

        {

            Modify.CustomerServiceClient Client = new Modify.CustomerServiceClient();

            Modify.AxdCustomer customer = new Modify.AxdCustomer();

            Modify.AxdEntity_CustTable[] custTable = new Modify.AxdEntity_CustTable[1];

 

            Modify.CallContext CallContext = new Modify.CallContext() { Company = "CEU" };

            Modify.EntityKey[] entityKeyLists = new Modify.EntityKey[1];

            Modify.EntityKey entityKeys = new Modify.EntityKey();

            Modify.KeyField[] keyDataLists = new Modify.KeyField[1];

            Modify.KeyField keyFields = new Modify.KeyField();

            keyFields.Field = "AccountNum";

           keyFields.Value = "1101";

            keyDataLists[0] = keyFields;

           entityKeys.KeyData = keyDataLists;

           entityKeyLists[0] = entityKeys;

           Modify.EntityKey[] entityKeyList = new Modify.EntityKey[1];

           Modify.EntityKey entityKey = new Modify.EntityKey();

            Modify.KeyField[] keyDataList = new Modify.KeyField[1];

            Modify.KeyField keyField = new Modify.KeyField();

            keyField.Field = "CashDisc";

            keyField.Value = "KArya";

            keyDataList[0] = keyField;

            entityKey.KeyData = keyDataList;

            entityKeyList[0] = entityKey;

            customer.CustTable = custTable;

            Client.update(CallContext, entityKeyLists, customer);

 

        }

    }

}

Now i am getting this error but i am unable to find this field can any one help me

 

 


Viewing all articles
Browse latest Browse all 73760

Trending Articles



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