Important Update: Archer Community Scheduled Maintenance on November 23–24 - New Community Launching Soon! Learn More..
2019-05-31 09:56 AM
I'm currently storing a variable that contains the Tracking ID from another application that has a cross reference into the app that I want to make this Custom Object. I'm not sure where to begin to be able to perform a lookup to reference that Tracking ID to the record in the cross referenced app. Would anyone be able to point me in the right direction?
2019-05-31 09:59 AM
Alexander,
I think you need to look into API by David Petty and Scott Hagemeyer:
https://community.rsa.com/thread/192212
https://community.rsa.com/thread/192200
More about API, you will know from Jeff Letterman:
2019-05-31 10:33 AM
I'm trying to avoid using API calls if possible. In previous Custom Objects I've been able to insert text into various field types or change values lists, I'm looking to see if something similar is possible for Cross Reference fields.
2019-05-31 10:34 AM
Alexander,
I do not think you can insert any date via pure JS into CR. Because JS is operating only with the end user content in the browser. While data are stored in the backend.
What you did with standard fields like Text or VL, you changed the DOM objects, but it got saved ONLY after you pressed Save.
CR is a bit different, as it is presented in form of a grid, but not actual data representation.
However, I might got your request wrongly.
2019-05-31 10:46 AM - edited 2021-06-02 10:07 AM
I'll drop this little nugget here
function setXrefFieldValues(fieldId,values){
field = $CM._fields[fieldId].clientId;
ArcherTech.UI.ReferenceField.CurrentLookupField = $find(field);
var currentField=ArcherTech.UI.ReferenceField.CurrentLookupField;
if(currentField) {
currentField.setLookedUpRecords(values);
if (currentField.get_isInDdeCondition() && Sys.WebForms.PageRequestManager.getInstance().get_isInAsyncPostBack()) {
var endRequestHandler = function () {
ArcherTech.UI.ReferenceField.UpdateCurrentField(values);
Sys.WebForms.PageRequestManager.getInstance().remove_endRequest(endRequestHandler);
};
Sys.WebForms.PageRequestManager.getInstance().add_endRequest(endRequestHandler);
} else {
ArcherTech.UI.ReferenceField.UpdateCurrentField(values);
}
}
}
Call the function like so:
setXrefFieldValues(1234, [5678,9012,3456]);
Advisory Consultant
2019-05-31 10:50 AM
Very nice, David
I wish I would know all internal functions You need to write a book
2022-11-03 04:52 PM
Is there any documentation for the Archer JS Library or do customers have to rely on the community and time to hack away at it?
2023-04-25 12:24 AM
Hi Dave,
I tried to use the above function to clear multiply XREF fields in my custom object code
2023-04-25 08:16 AM
@Fsantana the function will only clear the cross-reference fields supplied to the function. Add a console.log() right before you make the call to see what values you're sending to the function and see what's going on.
Advisory Consultant
2024-03-14 12:20 AM
Hi, I am also trying to use XREF function to clear out a Cross-reference field based on a selected value of a valuelist field. But I am no getting the correct response. The custom object seems to do nothing. What are the input values that I shoul specifiy ?