Forums

Forums / Developing Portals / CRM Contact Id

CRM Contact Id

Thread is closed for posting
4 posts, 3 answered
  1. clefsrud
    clefsrud avatar
    26 posts
    Registered:
    24 Nov 2014
    28 Apr 2015
    Link to this post
    How do I reference the "CRM Contact Id" (or similar) value from the logged-on user in javascript on a page?
  2. Missing user
    Missing user avatar
    Answered
    29 Apr 2015 in reply to clefsrud
    Link to this post
    Hi Chris,

    Currently this feature is not yet possible with ​The Portal Connector. We have added it to our internal list of enhancements.

    In addition, could you also ​give us more information as to what you're trying to do with the CRM Contact Id in JavaScript? If possible, we might be able to accomplish the same task in a different way.

    Kind Regards,
    Chris.
    Last modified on 29 Apr 2015 13:04 by Clinton Bale
  3. clefsrud
    clefsrud avatar
    26 posts
    Registered:
    24 Nov 2014
    Answered
    29 Apr 2015 in reply to Missing user
    Link to this post
    My specific situation is that I have a workflow rule that is trigged by a change in a lookup field (contact) on the lead record.  In the portal, I have a lead edit form which includes this lookup field to which changes may be made.  However, when a change to a record is posted to CRM from the portal, all fields on the portal form are 'changed' in CRM, whether or not the user actually altered the value.  Therefore, my workflow is triggered every time any change is posted; lots of false positives.  I asked a question in this regard in a previous thread.
    So I was attempting to flag when a change was truly made to my lookup field, and include this flag in the operation of the workflow.  By definition, the lookup field is set to the current user's contact (i.e. they can only see records that have been assigned to them).  So, my logic was simply to compare the guid of the lookup field value to the user's 'CRM Contact Id' guid, then set the flag accordingly to either trigger the workflow (if guids different) or not (guids the same).
    Since I cannot do this, I have implemented a goofy alternate that works accepatably.
  4. Clinton Bale
    Clinton Bale avatar
    126 posts
    Registered:
    21 Feb 2014
    Answered
    29 Apr 2015 in reply to clefsrud
    Link to this post
    Hello Chris,

    I'm glad you have found an alternative albeit goofy solution to this issue.

    As said previously we will be looking further into passing the profile details to the JavaScript side of the Portal Connector. We will also be looking at only submitting changed data from forms, not only to avoid workflow issues like this, but to optimize data flow between The Portal Connector and Dynamics CRM.

    Thank you for your explanation.

    Best Regards,
    Clinton
4 posts, 3 answered