cancel
Showing results for 
Search instead for 
Did you mean: 

Query not working on extended fields of standard Opportunity Business Object

former_member535186
Participant
0 Kudos

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 ;

Accepted Solutions (0)

Answers (0)