x++


How to Edit address using X++ in AX 2012


I have a address filled corresponding to a Customer record in AX 2012. Now, My requirement is to Select Address from Address tab of a Edit Customer form and then to update the same using X++ Code.. I have tried to perform below code after passing current Party and Location ID..
obj_DirParty = DirParty::constructFromPartyRecId(obj_partyTable.RecId );
obj_DirParty.createOrUpdatePostalAddress(obj_postalAddress, formRun.purposecon());
But it is throwing error saying...
Microsoft Dynamics AX Views are read only.
So ultimately I have to press ESC button to disallow changes, however a new record is being added in a DirpartyPostalAddressView and I am able to see my changes before pressing ESC in a form. But after pressing ESC, changes being made to LogisticsLocation table record changes to previous data.
My question is: how to avoid this error so I can get my updated data in a form.

Related Links

Advanced query range
How to read from an Excel file?
group by clause in X++
Determine the number of affected rows by an update_recordset call in Dynamics 4.0?
how to protect the x++ source code
About Data Dictionary
setTimeOut and local function
Passing FromControl in a lookup override method
Reference control from datamethod in generated design
Extended EDT does not compare dates
How to display a tooltip in Dynamics AX 4.0?
how to disable intellisense in ax2012's code editor?
How do you “Run” a class
General quesions about Dynamics Ax
Convert date into julian date
How to change the level of AX info messages

Categories

HOME
grok
gridview
turing-machines
api
hyperlink
string
datastore
twig
mstest
saml-2.0
package
jsf-2.2
entity-framework-core
cq5
python-multithreading
character
accessibility
fabric.io
commonjs
enthought
linear-algebra
powershell-v5.0
job-scheduling
sencha-touch
hta
google-api-client
dapper-extensions
jackson-modules
android-maps
inversion-of-control
subclass
uitapgesturerecognizer
postback
dst
weather
android-sugarorm
sendbird
indy10
lint
timing
health-monitoring
p4merge
trigonometry
levenshtein-distance
movilizer
install.packages
tcc
wc
signal-strength
pom.xml
gitlist
podscms
arq
aquamacs
amq
rmongo
redistributable
actor-platform
adafruit
jodd
x-tag
expectations
gogs
shopping
http-status-code-401
riot
sklearn-pandas
redis-cluster
uiactionsheet
upx
cycle2
piracy-prevention
design-principles
iokit
xenomai
django-urls
dronekit-android
nutiteq
kubuntu
rrule
apache-spark-1.3
boost-program-options
iso-prolog
raygun
template-deduction
jquery-slider
terminate
scriptaculous
bjyauthorize
frameworkelementfactory
uimanageddocument
cakephp-1.2
faye
database-create
httponly
fitbounds
cgimage
flex-mobile
quotation-marks
updatesourcetrigger
jqueryform
zend-rest
burndowncharts
alsb
xpsdocument
mathematical-typesetting

Resources

Mobile Apps Dev
Database Users
javascript
java
csharp
php
android
MS Developer
developer works
python
ios
c
html
jquery
RDBMS discuss
Cloud Virtualization
Database Dev&Adm
javascript
java
csharp
php
python
android
jquery
ruby
ios
html
Mobile App
Mobile App
Mobile App