Accessing field values from another entity via an advanced search select

Hi,

I've been tasked by my manager to see if it is possible to pull information from a quote into an opportunity.

At the moment within our test system, I managed to get an advanced search select to look at the quotes that were created from a opportunity, I've been trying for a while to pull certain values from the selected quote to populate opportunity fields, the reason behind this is to have our users have a quick "summary" of a quote that will most likely to convert into an order.

I'm familiar with accessing information across entities with CRM.GetContextInfo("entity","field name") but only when it's been a 1:many relationship for example, quotes getting information from the opportunity as in our CRM one opportunity can have many quotes but not the other way round.

We're hoping this can be done, I've tried different ways of approaching it but no luck,

Any help on this would be amazing,

Thanks in advance,

Lee

Parents
  • 0

    Where have you put the script? In the custom content on onchange for the oppo_primequote field.

    The issue is 'probably' this line:

    crm.fields("oppo_quotevalue").value = quoteField.quot_quotevalue;

    which should be something like:

    crm.fields("oppo_quotevalue").value(crmRecord.quot_quotevalue);

    Just on that, its worth knowing that best practice is to use a prefix to the field to denote its custom, for example oppo_c_primequote. This means that if Sage ever added new functionality that used a new field call oppo_primequote it wouldn't break your existing code. It also helps to understand whats custom and what not in the future.

Reply
  • 0

    Where have you put the script? In the custom content on onchange for the oppo_primequote field.

    The issue is 'probably' this line:

    crm.fields("oppo_quotevalue").value = quoteField.quot_quotevalue;

    which should be something like:

    crm.fields("oppo_quotevalue").value(crmRecord.quot_quotevalue);

    Just on that, its worth knowing that best practice is to use a prefix to the field to denote its custom, for example oppo_c_primequote. This means that if Sage ever added new functionality that used a new field call oppo_primequote it wouldn't break your existing code. It also helps to understand whats custom and what not in the future.

Children
No Data