Ha ha I was looking for the same object on the same layout! "Popover | Affect Customer [Get Script Parameter]" right? I don't know how to find by object either, but this is what I tried:
- I looked at the design database report and saw that the following layouts use this script"
- I then went to each of these layouts, found an unamed object, and named it 2.
- My thinking was, if an object by the name of 2 already existed, I would not be allowed to name another object 2
- On every layout, I was in fact able to name an object 2. ONce I did, any attempt to name another object '2' gave me the sort of error message you'd expect (can't name this cause another object is named 2)
- Seems to me there is no 'object 2.'
- Perhaps referring to an unamed object has some use? Or perhaps this is leftover from another application of this script? Or perhaps the conclusion I drew from my naming test are incorrect? I dunno.
Edit: Wow, none of my formatting shows up in the posts (bullet lists and such). And while I'm on the subject, what's the deal with the context menu (right click) on this forum? I get a custom (and severely gimped version if I right click in the edit post box (mac, chrome).
Yes, that's exactly the script I was after - Although I run the script debugger and when I run the script on my own application I get an error at that step, when I run it in the sample application it works - so I assumed that there must actually be a object 2 somewhere.
I'm having trouble get the script to complete in my own solution.
Did you get it working in yours?
I'm not using that exact script anymore, but if I recall correctly, when I first implemented it I just named an object "2" (I suppose I just took it for granted that best practices dictated that one move at that point lol). The second time I'm pretty sure I just omitted that line altogether. Both times it worked fine (from what I could see). I'm a total noob, but I'd be happy to go into more detail if you're getting errors from other lines as well.
I'd also recommend this post if your imitating the invoice lay outs as it runs the flush cache step pretty often (whenever it calls that 'trigger | refresh' script or whatever it's called).:
By the way, I created a new invoice starter solution from scratch and ran the script with the debugger. I did in fact get error 116.