Hi, how can we populate the value of the id field of model to lookup field in another model?

  • 1
  • Question
  • Updated 4 years ago
Photo of Rimali Gurav

Rimali Gurav

  • 272 Points 250 badge 2x thumb

Posted 4 years ago

  • 1
Photo of Irvin Waldman

Irvin Waldman, Champion

  • 9,006 Points 5k badge 2x thumb
Rimali,

Have you looked into the action framework or snippets?  Alternatively, you can go the trigger route.

Irvin
Photo of Rimali Gurav

Rimali Gurav

  • 272 Points 250 badge 2x thumb
Hi
Thanks for your reply.I have tried with action but of no success. While creating  new row am trying to copy the original contactid to another dummy field but nothing happening plz help.
Photo of Rimali Gurav

Rimali Gurav

  • 272 Points 250 badge 2x thumb
Hi,

It is now populating the value on page .I changed my id field to Name.

But now problem is I want to add the record from old model to new model only at once and if it is repeating then it should give error message of duplicate record like If..else condtion in Run multiple action after blocking the UI.

plz suggest
Photo of Irvin Waldman

Irvin Waldman, Champion

  • 9,006 Points 5k badge 2x thumb
Rimali,

It can be difficult to answer these sorts of questions w/o additional information.  Anything else you can share would help the community to better support you e.g. XML, snippets, screenshots, etc. ?

Irvin
Photo of Rob Hatch

Rob Hatch, Official Rep

  • 44,026 Points 20k badge 2x thumb
Rimali.  If I understand you correctly - if the lookup is populated,  then don't allow the field in new model to be changed.  
 
You can start your action sequence with a snippet that just looks for whether the lookup field in the new model has some value.  If it is, then return false, which will force Action Framework into "on error actions" - where you can populate an error message.