Skip to content

Commit

Permalink
Merge pull request #175 from andrii-solokh-mnfd/patch-1
Browse files Browse the repository at this point in the history
fix: Winter 25 - Legacy redirections disabled, CPQ set settings
  • Loading branch information
FabienTaillon authored Oct 10, 2024
2 parents 3bd47fe + fd9071d commit 349b5c6
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 349b5c6

Please sign in to comment.