The isprimary flag on the multiassetlocci is intended to represent the asset directly referenced on the SR (IE SR.assetnum). If you don't have a valid asset/location on the SR before I could see that being a problem
Original Message:
Sent: Thu October 26, 2023 01:44 AM
From: Juris Flugins
Subject: SR from REST - linear assets
Reason, as I wrote, was that information for linear asset was not filled trough REST, which is done when SR is created from interface.
Technically that is related record in MULTIASSETLOCCI table.
What we done - we added additional attribute to POST REST call (of course, table was added to relevant OS)
...&multiassetlocci.isprimary = 1 (not in fact correct, as some other attributes are not filled, but it works)
which creates that record for that SR, and then we can create now WO from those SR.
------------------------------
Juris Flugins
Original Message:
Sent: Wed October 25, 2023 03:44 PM
From: Steve Hauptman
Subject: SR from REST - linear assets
Hi Juris,
There should not be a reason for not being able to create a work order unless there is no site being provided on the SR from which a work order can be created. If there is a site then I think your best bet here is to open a Salesforce Case so an SME can collect more info from you and help troubleshoot.
------------------------------
Steve Hauptman
Original Message:
Sent: Tue October 17, 2023 10:39 AM
From: Juris Flugins
Subject: SR from REST - linear assets
We are creating new SR with REST. Mainly it is OK. we noticed, when SR is created for linear asset, then we can't create WO from that SR. There was meaningless error message.
Then I noticed, that for those SR, which are created from REST, linear information is not filled.
We were using standard os MXSR. Also tried another one.
Added there also that MULTIASSETLOCCI, tried also different relationships for it.
Also added for asset selection dialog, so that by default there is ALL assets.
Nothing helped.
What else to try, some different class for os?
Thank You!
------------------------------
Juris Flugins
------------------------------