Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics CRM (Archived)

How Pre-image and Post-image get the records

Posted on by 775

hello,

I understand the meaning of images that can be records of available in sql backend but question is how they are get the record in entity.? 

*This post is locked for comments

  • Suggested answer
    Aric Levin Profile Picture
    Aric Levin 30,188 on at
    RE: How Pre-image and Post-image get the records

    I think you are approaching this the wrong way, and even if you decide to use server side code, I don't think that you need to use pre-image and post-image, because the issues is with validation.

    I think the easiest thing for you to do, is on the selection of a new city, clear out the country lookup using JavaScript.

    The fields should already be related, so that you only see the correct values when you select the initial value, but if you set the country lookup to null after the city is selected, it will require the user to select from a list of countries which will be the correct list.

    Hope this helps.

  • Verified answer
    kiran_rajput Profile Picture
    kiran_rajput 775 on at
    RE: How Pre-image and Post-image get the records

    Thanx for Reply,

    I will get the records from lookup field, Whenever the city changed on update.

    new_city and new_country has two lookup field on account entity,

    city=delhi and country=india on pre-image and when city=hong kong and country=india then throw the exception bcz getting wrong country ..

    how is possible coding using pre-image and post-image because i dont undersand the how it working.

    thank you.

  • Verified answer
    Priyesh Profile Picture
    Priyesh 7,392 User Group Leader on at
    RE: How Pre-image and Post-image get the records

    About Pre and Post Images, you can get these when you do Plugin development on CRM. Can you kindly rephrase your question?

    Going by what you mention, once you are in the Plugin Registration Tool, you can create PrePost Images on plugin steps you register.

  • Verified answer
    Aric Levin Profile Picture
    Aric Levin 30,188 on at
    RE: How Pre-image and Post-image get the records

    Hi Kiran,

    Not sure what you are asking. Can you rephrase?

    In general the Preimage and Post images provide you with a snapshot of the entity either before or after the changes are committed.

    For example, when a user makes a change to a particular entity and your Update message is Post-Operation, you can get the values before the entity was changed by getting the Preimage, so that you can see what the changes were.

    Please expand on your question if you are looking for further details.

  • Verified answer
    Kishor Kumar Profile Picture
    Kishor Kumar 3,702 on at
    RE: How Pre-image and Post-image get the records

    Kiran, Pre-Image is before the Database Transaction - Like if you enter value in the text box before saving.

    Post -Image is after Database Transaction - Like if you enter value in the text box after saving

    Check this link for more details,

    community.dynamics.com/.../pre-image-38-post-image-explained-33

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Tips for Writing Effective Suggested Answers

Best practices for providing successful forum answers ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,280 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,235 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans