This works, exactly I wanted !! Thanks a lot to everyone.
- Log in to post comments
This works, exactly I wanted !! Thanks a lot to everyone.
Thanks a lot !!
Thanks a lot..
The above example would work but how can I do it with Ensemble Outbound adapter. Since we have no reference of HttpRequest object.
(I did not find a field like ContentType in Adapter class.)
No, we have no object reference of HttpRequest (SetHeader is a method of HttpRequest object)
Thanks to all for your valuable responses.
Hi John Kumpf ,
In my case this field cannot be kept as a calculated. I need this to be unique and persistent.
Thanks
Thank you @Rodolfo Pscheidt Jr . It worked after your change.
The below routine can be used for it.
CLSCOPY
Q
COPY(Class,NewClass,Qual="")
; Copy a class
; Pass Qual as 'ck' to keep the source
N (Class,NewClass, Qual)
;TSTART
Q:Class="" "Class Name Can't be empty"
Q:$D(^oddDEF(Class))'=11 "Class "_Class_" is not found."
M ^oddDEF(NewClass) = ^oddDEF(Class)
S ^oddDEF(NewClass,1) = NewClass
K:'(Qual["k") ^oddDEF(NewClass,"s")
D $system.OBJ.Compile(NewClass,Qual,.ER)
D $system.OBJ.Compile(NewClass,Qual,.ER)
;I ER TROLLBACK Q ER(1)
I ER Q ER(1)
;TCOMMIT
Q 1
COPYPKG(Pkg,NewPkg,Qual="") ; Copy a package
N (Pkg, NewPkg, St, Qual)
K St
S Sub = Pkg_"."
While 1 {
S Sub = $O(^oddDEF(Sub)) Q:Sub=""
W Sub,!
I $P(Sub,".") '= Pkg Q
S St($I(St)) = Sub_"|"_$$COPY(Sub,NewPkg_"."_$P(Sub,".",2,*),Qual)
}
Q St
Thank you so much ! this is exactly what I was looking for.