Skip to content
Snippets Groups Projects
Commit f3b437db authored by Pascal Neub's avatar Pascal Neub Committed by Sebastian Listl
Browse files

[Projekt: xRM-Sales][TicketNr.: 1076358][Angebotserstellung aus 360° Ansicht...

[Projekt: xRM-Sales][TicketNr.: 1076358][Angebotserstellung aus 360° Ansicht nimmt zufälligen Kontakt zur Verknüpfung]
null order by fix
parent 37285453
No related branches found
No related tags found
No related merge requests found
......@@ -5,6 +5,9 @@ import("system.result");
var contactids = newSelect( "CONTACTID" )
.from("CONTACT")
.where("CONTACT.ORGANISATION_ID", vars.getString("$field.ORGANISATIONID"))
.orderBy("CONTACT.PERSON_ID DESC").arrayColumn();
// ordering is necessary because the 360DegreeObject_entity will use the first
// entry as default for creating offers, salesprojects and so on
.orderBy(new SqlMaskingUtils().isNull("PERSON_ID", "'0'"))
.arrayColumn();
result.string( JSON.stringify(contactids) );
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment