Populate Invoice Product Data

Unanswered Populate Invoice Product Data

  • Monday, August 06, 2012 7:33 AM
     
     

    Hi,

    Is it possible to auto populate invoice product fields from opportunity products?

    My research has lead me to relationships. Am I on the right track? If so what would be the relatiosnhip type? Thanks in advance.

All Replies

  • Monday, August 06, 2012 2:59 PM
    Moderator
     
     
    Are you working through the sales process from Opportunity -> Quote -> Order -> Invoice? If so, standard product data should be retained throughout each stage.  You can also have a look at this blog as to edit the built in field mappings. 

    Jason Lattimer

  • Monday, August 06, 2012 9:45 PM
     
     

    Thanks for your response.

    We jump from Opportunity to Invoice.

  • Monday, August 06, 2012 11:19 PM
    Moderator
     
      Has Code

    I believe the process in the blog I noted will still work between Opportunity Product and Invoice Product.

    Assuming you aren't running the Online version of CRM 2011 you can run this query in SQL Management Studio to get the Entity Mapping ID to plugin into the URL to access the hidden mapping screen and match up your fields.

    SELECT	EntityMapId 
    FROM	EntityMapBase 
    WHERE	TargetEntityName='invoicedetail' AND SourceEntityName='opportunityproduct'
    

    Then in the browser go to: http://yourServer/yourOrg/Tools/SystemCustomization/Relationships/Mappings/mappingList.aspx?mappingId=QueryResultID(GUID)

    From there you should be able to use the interface to create mappings. Be sure and Publish afterward. 


    Jason Lattimer

  • Tuesday, August 07, 2012 11:26 AM
     
     
    Im running online...
  • Tuesday, August 07, 2012 4:18 PM
    Moderator
     
     

    You might have to write a plugin to accomplish then. The concern there being matching up your line items between Opportunity and Invoice as at the line item level I don't believe there is anything that relates a specific Opportunity Product to an Invoice Detail line. You can match on the Product Id but there might be the possibility of having more than one of the same product on an Opportunity with different custom field values (assuming your set up allows this). The Invoice level does link to an Opportunity. 


    Jason Lattimer