Skip to content

Commit

Permalink
fix: Winter 25 - Legacy redirections disabled, CPQ set settings
Browse files Browse the repository at this point in the history
  • Loading branch information
andrii-solokh-mnfd authored Sep 20, 2024
1 parent 344cdaf commit fd9071d
Showing 1 changed file with 14 additions and 3 deletions.
17 changes: 14 additions & 3 deletions src/commands/texei/cpqsettings/set.ts
Original file line number Diff line number Diff line change
Expand Up @@ -224,8 +224,19 @@ export default class Set extends SfCommand<CpqSettingsSetResult> {
return `${instanceUrlClean}/secur/frontdoor.jsp?sid=${accessToken}`;
}

// eslint-disable-next-line class-methods-use-this
private async getSettingURL(urlOfInstance: string) {
return `${urlOfInstance.substring(0, urlOfInstance.indexOf('.'))}--sbqq.visualforce.com/apex/EditSettings`;
private async getSettingURL(urlOfInstance: string): Promise<string> {
let prefix;

if (this.org.isScratch()) {
prefix = "--sbqq.scratch";
} else if (this.org.isSandbox()) {
prefix = "--sbqq.sandbox";
} else {
prefix = "--sbqq";
}

const ending = `${prefix}.vf.force.com/apex/EditSettings`

return `${urlOfInstance.substring(0, urlOfInstance.indexOf('.'))}${ending}`;
}
}

0 comments on commit fd9071d

Please sign in to comment.