@@ -190,6 +190,7 @@ export default class RefreshSandbox extends SandboxCommandBase<SandboxCommandRes
190190
191191 let apexId : string | undefined ;
192192 let groupId : string | undefined ;
193+ let srcId : string | undefined ;
193194
194195 if ( defFileContent . ApexClassName ) {
195196 apexId = await requestFunctions . getApexClassIdByName (
@@ -206,6 +207,15 @@ export default class RefreshSandbox extends SandboxCommandBase<SandboxCommandRes
206207 ) ;
207208 delete defFileContent . ActivationUserGroupName ;
208209 }
210+
211+ if ( defFileContent . SourceSandboxName ) {
212+ srcId = await requestFunctions . getSrcIdByName (
213+ this . flags [ 'target-org' ] . getConnection ( ) ,
214+ defFileContent . SourceSandboxName
215+ ) ;
216+ delete defFileContent . SourceSandboxName ;
217+ }
218+
209219 // Warn if sandbox name is in `--name` and `--definition-file` flags and they differ.
210220 if ( defFileContent ?. SandboxName && sbxName && sbxName !== defFileContent ?. SandboxName ) {
211221 this . warn ( messages . createWarning ( 'warning.ConflictingSandboxNames' , [ sbxName , defFileContent ?. SandboxName ] ) ) ;
@@ -234,6 +244,7 @@ export default class RefreshSandbox extends SandboxCommandBase<SandboxCommandRes
234244 AutoActivate : ! this . flags [ 'no-auto-activate' ] ,
235245 ...( apexId ? { ApexClassId : apexId } : { } ) ,
236246 ...( groupId ? { ActivationUserGroupId : groupId } : { } ) ,
247+ ...( srcId ? { SourceId : srcId } : { } ) ,
237248 } ) ;
238249
239250 return sandboxInfo ;
0 commit comments