web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics CRM (Archived)

How Pre-image and Post-image get the records

(0) ShareShare
ReportReport
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

I have the same question (0)
  • Verified answer
    Kishor Kumar Profile Picture
    3,710 on at

    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

  • Verified answer
    Aric Levin - MVP Profile Picture
    30,190 Moderator on at

    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
    Priyesh Profile Picture
    7,396 User Group Leader on at

    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
    kiran_rajput Profile Picture
    775 on at

    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.

  • Suggested answer
    Aric Levin - MVP Profile Picture
    30,190 Moderator on at

    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.

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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics CRM (Archived)

#1
SA-08121319-0 Profile Picture

SA-08121319-0 4

#1
Calum MacFarlane Profile Picture

Calum MacFarlane 4

#3
Alex Fun Wei Jie Profile Picture

Alex Fun Wei Jie 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans