Skip to Content

Query not working on extended fields of standard Opportunity Business Object

Nov 08, 2017 at 01:39 PM


avatar image

In AfterLoading Event I've Create a Query on Standard Business object to Retrieve data in Extended fields in New Tab, data not displayed on the query result !!

var query = Opportunity.QueryByElements;

var resultData = query.ExecuteDataOnly();

var selectionParams = query.CreateSelectionParams(); selectionParams.Add(query.ID.content, "I", "EQ", this.OpportunityID);

Result var resultData = query.ExecuteDataOnly(selectionParams);

foreach (var item in resultData)


this.LgStatus = item.LgStatus ;

this.LgAmountData = item.LgAmount ;


- And if I use Association on Opportunity BO

[CrossDeploymentUnit] association ToOpportunity to Opportunity ;

in afterModify event.....

var opportunity ;

opportunity = Opportunity.Retrieve(this.OpportunityID);

if( opportunity.IsSet()) {

this.ToOpportunity = opportunity.ToRoot ;


- the OpportunityID is custom field in custom Business object which initialize the association, OpportunityID's DataType is "ID", an error raises that i can not use String or Numeric as Parameter, so how can i define OpportunityID to be used in association Retrive Function.

[Label("Opportunity ID")] element OpportunityID : ID ;

10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

0 Answers