Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics AX forum
Unanswered

which method to use

Posted on by 2,985

Hi All,

In a form there are 5records in the grid which has no button control, I am modifying 2fields in the grid its calling two times the update method.

My requirement is whenever the update happened on the grid it should send the trigger ,but as of now its sending two triggers .

Which method I need to override to send single trigger.(so far 2records are creating in temp table instead I need to store 1 record).

  • Pravasti AK Profile Picture
    Pravasti AK 2,985 on at
    RE: which method to use

    That is the reason behind I posted in the forum. I tried out in close method but not sure will it affect in anycast.

  • Gunjan Bhattachayya Profile Picture
    Gunjan Bhattachayya 35,417 on at
    RE: which method to use

    Since this is a single record being written, I don't think there will be a decrease in the performance. I am not sure how else you can achieve this requirement.

  • Pravasti AK Profile Picture
    Pravasti AK 2,985 on at
    RE: which method to use

    If we place the logic in close method of a form, Will that decrease the performance.

  • Gunjan Bhattachayya Profile Picture
    Gunjan Bhattachayya 35,417 on at
    RE: which method to use

    I don't think any table method will work in that scenario. You can use the form > close method though. You can declare a boolean variable in the form class declaration. You can set this variable to true anytime you update a record in datasource > write method. In the form close method, you can write a condition to check for the value of the variable and write into the temp table if it is true.

  • Pravasti AK Profile Picture
    Pravasti AK 2,985 on at
    RE: which method to use

    Exactly, I am trying out that option

  • Gunjan Bhattachayya Profile Picture
    Gunjan Bhattachayya 35,417 on at
    RE: which method to use

    Whenever you modify the records and move to a different record, table update will be called. Are you trying to create a single record in the temp table every time you open the form and make changes (to a single record or multiple records)?

  • Pravasti AK Profile Picture
    Pravasti AK 2,985 on at
    RE: which method to use

    Updating single fields in 2 records.

  • Gunjan Bhattachayya Profile Picture
    Gunjan Bhattachayya 35,417 on at
    RE: which method to use

    Hi Pravasti,

    Are you updating two fields in the same record and the table update is getting triggered on each modification?

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... 287,995 Super User

#2
Martin Dráb Profile Picture

Martin Dráb 225,610 Super User

#3
nmaenpaa Profile Picture

nmaenpaa 101,148

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans